* fixing concept of phpstr dtor/free
[m6w6/ext-http] / http_functions.c
index bf3fab60a99111b9d96670808625bb4094dac54e..05f6b7ee14a7bed0ee15a8bfedcfb3450b0629d9 100644 (file)
@@ -975,11 +975,12 @@ PHP_FUNCTION(http_build_query)
        }
 
        if (SUCCESS != http_urlencode_hash_implementation_ex(HASH_OF(formdata), formstr, arg_sep, prefix, prefix_len, NULL, 0, NULL, 0, (Z_TYPE_P(formdata) == IS_OBJECT ? formdata : NULL) TSRMLS_CC)) {
-               phpstr_dtor(formstr);
+               phpstr_free(formstr);
                RETURN_FALSE;
        }
 
        if (!formstr->used) {
+               phpstr_free(formstr);
                RETURN_NULL();
        }