From 6b00f2346c2529a9169cf1c04580e293a77f6a71 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Tue, 10 Apr 2012 13:30:36 +0200 Subject: Fix read after efree() --- Changelog | 1 + execute.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 0eda8e8..248a523 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ 2012-02-12 - 0.9.34 + - Fix read after efree() that lets function_exists() malfunction - Fix build with clang compiler - Added a request variable drop statistic log message diff --git a/execute.c b/execute.c index a521c4a..40a7cca 100644 --- a/execute.c +++ b/execute.c @@ -1109,8 +1109,6 @@ static int ih_function_exists(IH_HANDLER_PARAMS) retval = (zend_hash_find(EG(function_table), lcname, func_name_len+1, (void **)&func) == SUCCESS); - efree(lcname); - /* * A bit of a hack, but not a bad one: we see if the handler of the function * is actually one that displays "function is disabled" message. @@ -1143,6 +1141,8 @@ static int ih_function_exists(IH_HANDLER_PARAMS) } } + efree(lcname); + RETVAL_BOOL(retval); return (1); } -- cgit v1.3