]> granicus.if.org Git - apache/commitdiff
apr dbd and mod dbd have been mixed up in the handle closing function, so let's sort...
authorDaniel Gruno <humbedooh@apache.org>
Sun, 27 Jan 2013 23:26:43 +0000 (23:26 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Sun, 27 Jan 2013 23:26:43 +0000 (23:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1439208 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_dbd.c

index 4c71a1783471e606720ff5310b6e3098d1bc5241..350ec2474b5a7c49590e5964c701b870445c9097 100644 (file)
@@ -65,14 +65,14 @@ int lua_db_close(lua_State *L)
     
     db = lua_get_db_handle(L);
     if (db && db->alive) {
-        if (db->type == LUA_DBTYPE_MOD_DBD) {
+        if (db->type == LUA_DBTYPE_APR_DBD) {
             rc = apr_dbd_close(db->driver, db->handle);
+            if (db->pool) apr_pool_destroy(db->pool);
         }
         else {
             lua_ap_dbd_close = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_close);
             if (lua_ap_dbd_close != NULL)
                 if (db->dbdhandle) lua_ap_dbd_close(db->server, db->dbdhandle);
-            if (db->pool) apr_pool_destroy(db->pool);
         }
 
         db->driver = NULL;