From: Dmitry Stogov Date: Tue, 7 Jun 2005 15:38:37 +0000 (+0000) Subject: Fixed memory allocation bugs. Probably this patch should fix bug #31725. X-Git-Tag: php-5.0.5RC1~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfbbf5cedce017ad44147aab4840477232d9a6db;p=php Fixed memory allocation bugs. Probably this patch should fix bug #31725. --- diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 23cdab56d1..35c5e9c56d 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -1173,6 +1173,7 @@ PHP_FUNCTION(sqlite_popen) } if (errmsg) { zval_dtor(errmsg); + ZVAL_NULL(errmsg); } if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { @@ -1248,6 +1249,7 @@ PHP_FUNCTION(sqlite_open) } if (errmsg) { zval_dtor(errmsg); + ZVAL_NULL(errmsg); } if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { @@ -1302,6 +1304,7 @@ PHP_FUNCTION(sqlite_factory) } if (errmsg) { zval_dtor(errmsg); + ZVAL_NULL(errmsg); } if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {