#46109 [Asn->Csd]: MySQLi::init - Memory leaks
| From: | andrey@php.net | Date: | Fri, 19 Sep 2008 11:40:22 +0000 |
| Subject: | #46109 [Asn->Csd]: MySQLi::init - Memory leaks | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129100@lists.php.net to get a copy of this message | ||
ID: 46109
Updated by: andrey@php.net
Reported By: felipe@php.net
-Status: Assigned
+Status: Closed
Bug Type: MySQLi related
PHP Version: 5.3CVS-2008-09-17 (CVS)
Assigned To: andrey
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Thanks for heads up!
Previous Comments:
------------------------------------------------------------------------
[2008-09-17 17:54:07] felipe@php.net
Description:
------------
Calling init() two or more times generates the mem. leak.
Reproduce code:
---------------
<?php
$x = new mysqli;
$x->init();
$x->init();
Actual result:
--------------
==19445== 988 (12 direct, 976 indirect) bytes in 1 blocks are
definitely lost in loss record 5 of 7
==19445== at 0x4021620: malloc (vg_replace_malloc.c:149)
==19445== by 0x83A4EB8: _ecalloc (zend_alloc.c:2414)
==19445== by 0x816F4A1: zif_mysqli_init (mysqli_api.c:1330)
==19445== by 0x83FB4DF: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==19445== by 0x83E9602: execute (zend_vm_execute.h:104)
==19445== by 0x83C3A6E: zend_execute_scripts (zend.c:1197)
==19445== by 0x836916C: php_execute_script (main.c:2080)
==19445== by 0x845B734: main (php_cli.c:1130)
==19445==
==19445==
==19445== 952 bytes in 1 blocks are indirectly lost in loss record 6 of
7
==19445== at 0x4021620: malloc (vg_replace_malloc.c:149)
==19445== by 0x4F3D31C: my_malloc (in
/usr/lib/libmysqlclient_r.so.15.0.0)
==19445== by 0x4F6325E: mysql_init (in
/usr/lib/libmysqlclient_r.so.15.0.0)
==19445== by 0x816F483: zif_mysqli_init (mysqli_api.c:1317)
==19445== by 0x83FB4DF: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==19445== by 0x83E9602: execute (zend_vm_execute.h:104)
==19445== by 0x83C3A6E: zend_execute_scripts (zend.c:1197)
==19445== by 0x836916C: php_execute_script (main.c:2080)
==19445== by 0x845B734: main (php_cli.c:1130)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46109&edit=1