]> granicus.if.org Git - apache/commitdiff
- return NULL if apr_reslist_acquire fails, so we don't end up possibly referencing...
authorDaniel Gruno <humbedooh@apache.org>
Fri, 21 Dec 2012 14:53:55 +0000 (14:53 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Fri, 21 Dec 2012 14:53:55 +0000 (14:53 +0000)
- initialize cache_info as NULL

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1424939 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_vmprep.c

index cf28bfc2c91e64ed1355dc80df82099be474bc33..b577f058c82aa1b65a1c86cae894f6dc8056ccbc 100644 (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)
 {
     lua_State *L = NULL;
-    ap_lua_finfo *cache_info;
+    ap_lua_finfo *cache_info = NULL;
     int tryCache = 0;
     
     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;
                     cache_info = sspec->finfo;
                 }
+                else {
+                    return NULL;
+                }
             }
         }
 #if APR_HAS_THREADS