Adding fix for Ticket #1683

This frees memory returned from a result set.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3943 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-11-23 20:23:43 +00:00
parent ac310dbabe
commit ca5753bc39
2 changed files with 2 additions and 0 deletions

View file

@ -116,6 +116,7 @@ class DboMysql extends DboSource {
* @return boolean True if the database could be disconnected, else false
*/
function disconnect() {
@mysql_free_result($this->results);
$this->connected = !@mysql_close($this->connection);
return !$this->connected;
}

View file

@ -110,6 +110,7 @@ class DboMysqli extends DboSource {
* @return boolean True if the database could be disconnected, else false
*/
function disconnect() {
@mysqli_free_result($this->results);
$this->connected = !@mysqli_close($this->connection);
return !$this->connected;
}