From: Ilia Alshanetsky Date: Wed, 25 Jun 2003 18:06:56 +0000 (+0000) Subject: Missing bit of the previous patch. X-Git-Tag: php-4.3.3RC2~248 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eee7417f1fca44e42a89d4d53c0e23db55dd204d;p=php Missing bit of the previous patch. --- diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index fea0e8e6ca..09cd4f63bd 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -1323,8 +1323,10 @@ static void php_sqlite_fetch_string(struct php_sqlite_result *res, zend_bool dec if (decode_binary && rowdata[0] != NULL && rowdata[0][0] == '\x01') { decoded = emalloc(strlen(rowdata[0])); decoded_len = sqlite_decode_binary(rowdata[0]+1, decoded); - efree((char*)rowdata[0]); - rowdata[0] = NULL; + if (!res->buffered) { + efree((char*)rowdata[0]); + rowdata[0] = NULL; + } } else if (rowdata[0]) { decoded_len = strlen((char*)rowdata[0]); if (res->buffered) {