You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2012/12/21 15:53:55 UTC

svn commit: r1424939 - /httpd/httpd/trunk/modules/lua/lua_vmprep.c

Author: humbedooh
Date: Fri Dec 21 14:53:55 2012
New Revision: 1424939

URL: http://svn.apache.org/viewvc?rev=1424939&view=rev
Log:
- return NULL if apr_reslist_acquire fails, so we don't end up possibly referencing a null-object
- initialize cache_info as NULL

Modified:
    httpd/httpd/trunk/modules/lua/lua_vmprep.c

Modified: httpd/httpd/trunk/modules/lua/lua_vmprep.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_vmprep.c?rev=1424939&r1=1424938&r2=1424939&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_vmprep.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_vmprep.c Fri Dec 21 14:53:55 2012
@@ -394,7 +394,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua
                                                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
                     L = sspec->L;
                     cache_info = sspec->finfo;
                 }
+                else {
+                    return NULL;
+                }
             }
         }
 #if APR_HAS_THREADS