projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
b2773ab
)
fix message object reversion
author
Michael Wallner
<mike@php.net>
Thu, 22 Jan 2015 13:12:40 +0000
(14:12 +0100)
committer
Michael Wallner
<mike@php.net>
Thu, 22 Jan 2015 13:12:40 +0000
(14:12 +0100)
php_http_message.c
patch
|
blob
|
history
diff --git
a/php_http_message.c
b/php_http_message.c
index 4109202226caae9abb31ac5340c5e69800899ea3..caf9ee82786347b7f4fb491ae928e5d22dc3e995 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-688,7
+688,7
@@
void php_http_message_object_reverse(zval *zmsg, zval *return_value)
/* add ref, because we previously have not been a parent message */
Z_ADDREF_P(zmsg);
/* add ref, because we previously have not been a parent message */
Z_ADDREF_P(zmsg);
- RETVAL_OBJ
(&objects[last]->zo
);
+ RETVAL_OBJ
ECT(&objects[last]->zo, 1
);
efree(objects);
} else {
efree(objects);
} else {
@@
-806,6
+806,8
@@
php_http_message_object_t *php_http_message_object_new_ex(zend_class_entry *ce,
o->message = msg;
if (msg->parent) {
o->parent = php_http_message_object_new_ex(ce, msg->parent);
o->message = msg;
if (msg->parent) {
o->parent = php_http_message_object_new_ex(ce, msg->parent);
+ /* not assigned to any zval, so refcount is 0 */
+ --GC_REFCOUNT(&o->parent->zo);
}
o->body = php_http_message_body_object_new_ex(php_http_message_body_class_entry, php_http_message_body_init(&msg->body, NULL));
}
}
o->body = php_http_message_body_object_new_ex(php_http_message_body_class_entry, php_http_message_body_init(&msg->body, NULL));
}