php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58492 HttpMessage::rewind memory leaks
Submitted: 2009-01-04 10:15 UTC Modified: 2009-01-13 04:51 UTC
From: felipe@php.net Assigned: mike (profile)
Status: Closed Package: pecl_http (PECL)
PHP Version: 5_3 CVS-2009-01-04 (dev) OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipe@php.net
New email:
PHP Version: OS:

 

 [2009-01-04 10:15 UTC] felipe@php.net
Description:
------------
See below.

A possible fix will be:
Index: ext/http/http_message_object.c
===================================================================
RCS file: /repository/pecl/http/http_message_object.c,v
retrieving revision 1.119
diff -u -p -r1.119 http_message_object.c
--- ext/http/http_message_object.c	24 Sep 2008 11:30:39 -0000	1.119
+++ ext/http/http_message_object.c	4 Jan 2009 15:15:13 -0000
@@ -1473,7 +1473,6 @@ PHP_METHOD(HttpMessage, rewind)
 		if (obj->iterator) {
 			zval_ptr_dtor(&obj->iterator);
 		}
-		ZVAL_ADDREF(getThis());
 		obj->iterator = getThis();
 	}
 }


Reproduce code:
---------------
$x = new httpmessage; $x->rewind();

Expected result:
----------------
Nothing.

Actual result:
--------------
[Sun Jan  4 12:58:14 2009]  Script:  '-'
/home/felipe/dev/php5/Zend/zend_vm_execute.h(476) :  Freeing 0x08CCD1B8 (20 bytes), script=-
=== Total 1 memory leaks detected ===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-13 04:51 UTC] mike@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 00:01:27 2024 UTC