Fixed: t3lib_BEfunc::getRecord() did not free recordset. This can cause memory leaks...
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 18 Apr 2007 08:49:38 +0000 (08:49 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 18 Apr 2007 08:49:38 +0000 (08:49 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2256 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index ae1f9a9..ff20770 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-18  Dmitry Dulepov  <dmitry@typo3.org>
+
+       * Fixed: t3lib_BEfunc::getRecord() did not free recordset. This can cause memory leaks if persistent mysql connections are used
+
 2007-04-14  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Workspaces: added class.wslib_gui.php to allow using WS GUI from extensions
index 1f99656..8a57a2d 100755 (executable)
@@ -234,7 +234,9 @@ class t3lib_BEfunc  {
                                $table,
                                'uid='.intval($uid).($useDeleteClause ? t3lib_BEfunc::deleteClause($table) : '').$where
                        );
-                       if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+                       $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
+                       if ($row) {
                                return $row;
                        }
                }