1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

- return NULL if apr_reslist_acquire fails, so we don't end up possibly referencing a null-object

- initialize cache_info as NULL

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Gruno
2012-12-21 14:53:55 +00:00
parent d9e3aa7316
commit c1f9c7546f

View File

@@ -394,7 +394,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
ap_lua_vm_spec *spec, request_rec* r) ap_lua_vm_spec *spec, request_rec* r)
{ {
lua_State *L = NULL; lua_State *L = NULL;
ap_lua_finfo *cache_info; ap_lua_finfo *cache_info = NULL;
int tryCache = 0; int tryCache = 0;
if (spec->scope == AP_LUA_SCOPE_SERVER) { if (spec->scope == AP_LUA_SCOPE_SERVER) {
@@ -428,6 +428,9 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
L = sspec->L; L = sspec->L;
cache_info = sspec->finfo; cache_info = sspec->finfo;
} }
else {
return NULL;
}
} }
} }
#if APR_HAS_THREADS #if APR_HAS_THREADS