From: Michael Wallner Date: Fri, 13 Apr 2012 11:17:03 +0000 (+0000) Subject: fix valgrind errors X-Git-Tag: RELEASE_2_1_0_RC3~10^2^2~134 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a2694ec713f44e2a07003e045c6adf76e327aecc;p=m6w6%2Fext-http fix valgrind errors --- diff --git a/php_http_property_proxy.c b/php_http_property_proxy.c index 4ec80ad..f4d3523 100644 --- a/php_http_property_proxy.c +++ b/php_http_property_proxy.c @@ -135,6 +135,7 @@ static zval *php_http_property_proxy_object_get(zval *object TSRMLS_DC) MAKE_STD_ZVAL(unset); ZVAL_NULL(unset); zend_symtable_update(Z_ARRVAL_P(obj->proxy->object), Z_STRVAL_P(obj->proxy->member), Z_STRLEN_P(obj->proxy->member)+1, (void *) &unset, sizeof(zval *), (void *) &data); + Z_ADDREF_PP(data); } return *data; @@ -151,10 +152,10 @@ static void php_http_property_proxy_object_set(zval **object, zval *value TSRMLS #if PHP_HTTP_PPDBG fprintf(stderr, "proxy_set: %s\n", Z_STRVAL_P(obj->proxy->member)); #endif + Z_ADDREF_P(value); if (Z_TYPE_P(target) == IS_OBJECT) { zend_update_property(Z_OBJCE_P(target), target, Z_STRVAL_P(obj->proxy->member), Z_STRLEN_P(obj->proxy->member), value TSRMLS_CC); } else { - Z_ADDREF_P(value); zend_symtable_update(Z_ARRVAL_P(target), Z_STRVAL_P(obj->proxy->member), Z_STRLEN_P(obj->proxy->member)+1, (void *) &value, sizeof(zval *), NULL); } /* propagate */