From: Felipe Pena Date: Thu, 29 Jul 2010 23:38:55 +0000 (+0000) Subject: - Fixed bug #52487 (PDO::FETCH_INTO leaks memory) X-Git-Tag: php-5.3.4RC1~407 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3ddef53b449a320132deb0e1e8cbf19ca77c248;p=php - Fixed bug #52487 (PDO::FETCH_INTO leaks memory) --- diff --git a/NEWS b/NEWS index 0c2dd0b569..352a57928c 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2010, PHP 5.3.4 - +- Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe) - Fixed bug #52436 (Compile error if systems do not have stdint.h) (Sriram Natarajan) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 7f8203c1d8..2403dfb911 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1887,7 +1887,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in switch (stmt->default_fetch_type) { case PDO_FETCH_INTO: if (stmt->fetch.into) { - Z_DELREF_P(stmt->fetch.into); + zval_ptr_dtor(&stmt->fetch.into); stmt->fetch.into = NULL; } break;