From: Michael Wallner Date: Fri, 18 Mar 2005 13:05:23 +0000 (+0000) Subject: * fix memleak X-Git-Tag: RELEASE_0_7_0~29 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=786c6c362f073455e364028426d1818ef0431078;p=m6w6%2Fext-http * fix memleak --- diff --git a/http_api.c b/http_api.c index 20dc30d..2b3e33c 100644 --- a/http_api.c +++ b/http_api.c @@ -1093,9 +1093,12 @@ PHP_HTTP_API char *_http_negotiate_q(const char *entry, const HashTable *support FOREACH_HASH_KEY(Z_ARRVAL(zentries), key, idx) { if (key) { - return estrdup(key); + key = estrdup(key); + zval_dtor(&zentries); + return key; } } + zval_dtor(&zentries); return estrdup(def); }