]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fixed crash condition when r.module_info() is called
authorGuenter Knauf <fuankg@apache.org>
Mon, 3 Jun 2013 22:05:07 +0000 (22:05 +0000)
committerGuenter Knauf <fuankg@apache.org>
Mon, 3 Jun 2013 22:05:07 +0000 (22:05 +0000)
for modules which dont have directives.

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

modules/lua/lua_request.c

index 828fc2b6f57f128abf1fe2871e83504440150103..e1c925d08115598b630597c8949a3afd61ea54b8 100644 (file)
@@ -1236,7 +1236,7 @@ static int lua_ap_module_info(lua_State *L)
     luaL_checktype(L, 1, LUA_TSTRING);
     moduleName = lua_tostring(L, 1);
     mod = ap_find_linked_module(moduleName);
-    if (mod) {
+    if (mod && mod->cmds) {
         const command_rec *cmd;
         lua_newtable(L);
         lua_pushstring(L, "commands");