Skip to content

Commit

Permalink
Fix read after efree()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanesser committed Apr 10, 2012
1 parent 13620d2 commit 6b00f23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions 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

Expand Down
4 changes: 2 additions & 2 deletions execute.c
Expand Up @@ -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.
Expand Down Expand Up @@ -1143,6 +1141,8 @@ static int ih_function_exists(IH_HANDLER_PARAMS)
}
}

efree(lcname);

RETVAL_BOOL(retval);
return (1);
}
Expand Down

0 comments on commit 6b00f23

Please sign in to comment.