From e3ddef53b449a320132deb0e1e8cbf19ca77c248 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 29 Jul 2010 23:38:55 +0000 Subject: [PATCH] - Fixed bug #52487 (PDO::FETCH_INTO leaks memory) --- NEWS | 2 +- ext/pdo/pdo_stmt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0