PHPWRITE(buf, strlen(buf));
}
c++;
- if (zend_hash_get_current_data(myht, (void **) (&data)) != SUCCESS || !data || (data == struc))
+ if (zend_hash_get_current_data(myht, (void **) (&data)) != SUCCESS || !data || (data == struc)) {
+ if (i == HASH_KEY_IS_STRING)
+ efree(key);
continue;
+ }
switch (i) {
case HASH_KEY_IS_LONG:{
pval *d = emalloc(sizeof(pval));
if ((i = zend_hash_get_current_key(myht, &key, &index)) == HASH_KEY_NON_EXISTANT) {
break;
}
- if (zend_hash_get_current_data(myht, (void **) (&data)) !=
- SUCCESS || !data || ((*data) == (*struc))) {
+ if (zend_hash_get_current_data(myht, (void **) (&data)) != SUCCESS || !data || ((*data) == (*struc))) {
+ if (i == HASH_KEY_IS_STRING)
+ efree(key);
continue;
}