From: Dmitry Stogov Date: Tue, 7 Jun 2005 15:39:35 +0000 (+0000) Subject: Fixed memory allocation bugs. Probably this patch should fix bug #31725. X-Git-Tag: php-5.0.1b1~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84392e5e7f4fa51dfaff9d07c2cff9367df404e6;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 839ae73583..f0cf248076 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -1205,6 +1205,7 @@ PHP_FUNCTION(sqlite_popen) } if (errmsg) { zval_dtor(errmsg); + ZVAL_NULL(errmsg); } if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { @@ -1280,6 +1281,7 @@ PHP_FUNCTION(sqlite_open) } if (errmsg) { zval_dtor(errmsg); + ZVAL_NULL(errmsg); } if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { @@ -1334,6 +1336,7 @@ PHP_FUNCTION(sqlite_factory) } if (errmsg) { zval_dtor(errmsg); + ZVAL_NULL(errmsg); } if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {