From: Dmitry Stogov Date: Tue, 27 May 2014 21:28:38 +0000 (+0400) Subject: Fixed refcounting X-Git-Tag: POST_PHPNG_MERGE~270 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=864aa7746fee41edb1b8f655eb3c4f62916b5896;p=php Fixed refcounting --- diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 88f6e4e91e..d6b4852b09 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -883,7 +883,7 @@ static PHP_METHOD(PDO, getAttribute) array_init(return_value); add_next_index_str(return_value, STR_COPY(dbh->def_stmt_ce->name)); if (!Z_ISUNDEF(dbh->def_stmt_ctor_args)) { - Z_ADDREF(dbh->def_stmt_ctor_args); + if (Z_REFCOUNTED(dbh->def_stmt_ctor_args)) Z_ADDREF(dbh->def_stmt_ctor_args); add_next_index_zval(return_value, &dbh->def_stmt_ctor_args); } return;