felipe Fri, 07 Jan 2011 01:11:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307203
Log:
- Fixed memory leak on SQLite3Result and SQLite3Stmt when assigning to a
reference.
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c
A php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_prepare_001.phpt
U php/php-src/trunk/ext/sqlite3/sqlite3.c
A php/php-src/trunk/ext/sqlite3/tests/sqlite3_prepare_001.phpt
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2011-01-07 00:24:18 UTC (rev 307202)
+++ php/php-src/branches/PHP_5_3/NEWS 2011-01-07 01:11:16 UTC (rev 307203)
@@ -77,28 +77,35 @@
. Fixed bug #53527 (php-fpm --test doesn't set a valuable return value).
(fat)
- SOAP extension:
- . Fixed possible crash introduced by the NULL poisoning patch (Mateusz
Kocielski, Pierre)
+ . Fixed possible crash introduced by the NULL poisoning patch.
+ (Mateusz Kocielski, Pierre)
- SPL extension:
. Fixed bug #53515 (property_exists incorrect on ArrayObject null and 0
values). (Felipe)
- SQLite3 extension:
- . Fixed memory leaked introduced by the NULL poisoning patch (Mateusz
Kocielski, Pierre)
+ . Fixed memory leaked introduced by the NULL poisoning patch.
+ (Mateusz Kocielski, Pierre)
+ . Fixed memory leak on SQLite3Result and SQLite3Stmt when assigning to a
+ reference. (Felipe)
. Add SQlite3_Stmt::readonly() for checking if a statement is read only.
(Scott)
- . Implemented FR #53466 (SQLite3Result::columnType() should return false
after all of the rows have been fetched). (Scott)
+ . Implemented FR #53466 (SQLite3Result::columnType() should return false
after
+ all of the rows have been fetched). (Scott)
- Streams:
. Implemented FR #26158 (open arbitrary file descriptor with fopen).
(Gustavo)
- XSL extension:
- . Fixed memory leaked introduced by the NULL poisoning patch (Mateusz
Kocielski, Pierre)
+ . Fixed memory leaked introduced by the NULL poisoning patch.
+ (Mateusz Kocielski, Pierre)
- Zip extension:
. Added the filename into the return value of stream_get_meta_data().
(Hannes)
. Fixed bug #53568 (swapped memset arguments in struct initialization).
(crrodriguez at opensuse dot org)
- . Fixed bug #53579 (stream_get_contents() segfaults on ziparchive streams)
(Hannes)
+ . Fixed bug #53579 (stream_get_contents() segfaults on ziparchive streams).
+ (Hannes)
. Fixed bug #53603 (ZipArchive should quiet stat errors). (brad dot froehle
at
gmail dot com, Gustavo)
Modified: php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2011-01-07 00:24:18 UTC
(rev 307202)
+++ php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2011-01-07 01:11:16 UTC
(rev 307203)
@@ -1964,7 +1964,7 @@
}
if (intern->db_obj_zval) {
- Z_DELREF_P(intern->db_obj_zval);
+ zval_ptr_dtor(&intern->db_obj_zval);
}
zend_object_std_dtor(&intern->zo TSRMLS_CC);
Added: php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_prepare_001.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_prepare_001.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_prepare_001.phpt
2011-01-07 01:11:16 UTC (rev 307203)
@@ -0,0 +1,17 @@
+--TEST--
+SQLite3 - memory leak on SQLite3Result and SQLite3Stmt
+--FILE--
+<?php
+
+function test(&$x) {
+ $class = new SQLite3(':memory:');
+ $x = $class->prepare('SELECT 1');
+}
+
+test($foo);
+
+echo "done\n";
+
+?>
+--EXPECTF--
+done
Property changes on:
php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_prepare_001.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native
Modified: php/php-src/trunk/ext/sqlite3/sqlite3.c
===================================================================
--- php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-01-07 00:24:18 UTC (rev
307202)
+++ php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-01-07 01:11:16 UTC (rev
307203)
@@ -1961,7 +1961,7 @@
}
if (intern->db_obj_zval) {
- Z_DELREF_P(intern->db_obj_zval);
+ zval_ptr_dtor(&intern->db_obj_zval);
}
zend_object_std_dtor(&intern->zo TSRMLS_CC);
Added: php/php-src/trunk/ext/sqlite3/tests/sqlite3_prepare_001.phpt
===================================================================
--- php/php-src/trunk/ext/sqlite3/tests/sqlite3_prepare_001.phpt
(rev 0)
+++ php/php-src/trunk/ext/sqlite3/tests/sqlite3_prepare_001.phpt
2011-01-07 01:11:16 UTC (rev 307203)
@@ -0,0 +1,17 @@
+--TEST--
+SQLite3 - memory leak on SQLite3Result and SQLite3Stmt
+--FILE--
+<?php
+
+function test(&$x) {
+ $class = new SQLite3(':memory:');
+ $x = $class->prepare('SELECT 1');
+}
+
+test($foo);
+
+echo "done\n";
+
+?>
+--EXPECTF--
+done
Property changes on:
php/php-src/trunk/ext/sqlite3/tests/sqlite3_prepare_001.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php