From: Daniel Earl Poirier Date: Sat, 1 May 2010 11:43:55 +0000 (+0000) Subject: An uninitialized pointer in ap_lua_mapped_handler_spec was causing X-Git-Tag: 2.3.6~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f07bb6b918b1dea8ce58fe60daa59b72baf718f4;p=apache An uninitialized pointer in ap_lua_mapped_handler_spec was causing seg faults in lua. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@939980 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_config.c b/modules/lua/lua_config.c index 312cc04d1a..f751432f0c 100644 --- a/modules/lua/lua_config.c +++ b/modules/lua/lua_config.c @@ -58,7 +58,7 @@ AP_LUA_DECLARE(apr_status_t) ap_lua_map_handler(ap_lua_dir_cfg *cfg, ap_regex_t *uri_pattern; apr_status_t rv; ap_lua_mapped_handler_spec *handler = - apr_palloc(cfg->pool, sizeof(ap_lua_mapped_handler_spec)); + apr_pcalloc(cfg->pool, sizeof(ap_lua_mapped_handler_spec)); handler->uri_pattern = NULL; handler->function_name = NULL; @@ -81,7 +81,7 @@ static int cfg_lua_map_handler(lua_State *L) { ap_lua_dir_cfg *cfg = check_dir_config(L, 1); ap_lua_mapped_handler_spec *handler = - apr_palloc(cfg->pool, sizeof(ap_lua_mapped_handler_spec)); + apr_pcalloc(cfg->pool, sizeof(ap_lua_mapped_handler_spec)); handler->uri_pattern = NULL; handler->function_name = NULL;