|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40883 mysql_query() is allocating memory incorrectly
Submitted: 2007-03-21 16:13 UTC Modified: 2007-03-23 08:00 UTC
From: edwin at aucs dot org Assigned: dmitry
Status: Closed Package: MySQL related
PHP Version: 5.2.1 OS: WinXP
Private report: No CVE-ID:
 [2007-03-21 16:13 UTC] edwin at aucs dot org
Memory leak in mysql_query, memory not being able to be freed by mysql_free_result properly

Reproduce code:
Refer to Listing 4 to 7 of

Expected result:
No memory leakage

Actual result:
mysql_query() is allocating memory incorrectly, even with the latest CVS snap


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-21 16:26 UTC]
The engine caches small memory blocks.
 [2007-03-23 08:00 UTC]
The problem was in Zend Memory Manager, that cached small memory blocks and didn't reuse cache on erealloc().

Fixed in CVS HEAD and PHP_5_2.
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 08:01:52 2015 UTC