ID:          46109
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:      Open
+Status:      Assigned
 Bug Type:    MySQLi related
 PHP Version: 5.3CVS-2008-09-17 (CVS)
-Assigned To: 
+Assigned To: andrey


Previous Comments:
------------------------------------------------------------------------

[2008-09-17 17:54:07] [EMAIL PROTECTED]

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

Reply via email to