From 786c6c362f073455e364028426d1818ef0431078 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 18 Mar 2005 13:05:23 +0000 Subject: [PATCH] * fix memleak --- http_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.30.2