felipe Mon, 14 Feb 2011 23:58:52 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308345
Log:
- Fixed memory leak on serialize(new SNMP)
Changed paths:
U php/php-src/trunk/ext/snmp/snmp.c
Modified: php/php-src/trunk/ext/snmp/snmp.c
===================================================================
--- php/php-src/trunk/ext/snmp/snmp.c 2011-02-14 23:43:22 UTC (rev 308344)
+++ php/php-src/trunk/ext/snmp/snmp.c 2011-02-14 23:58:52 UTC (rev 308345)
@@ -1988,9 +1988,9 @@
while (zend_hash_get_current_data_ex(&php_snmp_properties,
(void**)&hnd, &pos) == SUCCESS) {
zend_hash_get_current_key_ex(&php_snmp_properties, &key,
&key_len, &num_key, 0, &pos);
- MAKE_STD_ZVAL(val);
if (!hnd->read_func || hnd->read_func(obj, &val TSRMLS_CC) !=
SUCCESS) {
val = EG(uninitialized_zval_ptr);
+ Z_ADDREF_P(val);
}
zend_hash_update(props, key, key_len, (void *)&val, sizeof(zval
*), NULL);
zend_hash_move_forward_ex(&php_snmp_properties, &pos);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php