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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 02:03:38 2021 UTC