fix Bug #15509 HttpMessage::rewind memory leaks
authorMichael Wallner <mike@php.net>
Tue, 13 Jan 2009 09:51:45 +0000 (09:51 +0000)
committerMichael Wallner <mike@php.net>
Tue, 13 Jan 2009 09:51:45 +0000 (09:51 +0000)
http_message_object.c

index 81f31a4..8845681 100644 (file)
@@ -393,6 +393,10 @@ void _http_message_object_free(zend_object *object TSRMLS_DC)
 {
        http_message_object *o = (http_message_object *) object;
 
+       if (o->iterator) {
+               zval_ptr_dtor(&o->iterator);
+               o->iterator = NULL;
+       }
        if (o->message) {
                http_message_dtor(o->message);
                efree(o->message);