]> granicus.if.org Git - php/commitdiff
fix leak, take 2
authorAnatol Belski <ab@php.net>
Tue, 6 Dec 2016 15:12:39 +0000 (16:12 +0100)
committerAnatol Belski <ab@php.net>
Tue, 6 Dec 2016 15:12:39 +0000 (16:12 +0100)
ext/wddx/wddx.c

index 9394a59e27c7a4ff009db8b4af38f186cb116b2d..72d2408c1f990f641a66f44c32977e86c06440c7 100644 (file)
@@ -1057,7 +1057,7 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
                                } else  {
                                        zend_hash_next_index_insert(target_hash, &ent1->data, sizeof(zval *), NULL);
                                }
-                       } else if (!strcmp(name, EL_BINARY) && STR_EMPTY_ALLOC() == Z_STRVAL_P(ent1->data)) {
+                       } else if (!strcmp(name, EL_BINARY) && Z_STRLEN_P(ent1->data) < 1) {
                                zval_ptr_dtor(&ent1->data);
                        }
                        efree(ent1);