]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1737014 from trunk:
authorYann Ylavic <ylavic@apache.org>
Fri, 1 Apr 2016 12:29:46 +0000 (12:29 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 1 Apr 2016 12:29:46 +0000 (12:29 +0000)
mod_proxy_express: Fix possible use of DB handle after close.
PR 59230.

Submitted by: Petr <pgajdos suse.cz>
Reviewed by: ylavic, trawick, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1737363 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/proxy/mod_proxy_express.c

diff --git a/CHANGES b/CHANGES
index 21553d950286475770dd9674f2a20cfcdb41ed82..964139f1274b6cab8058f34691965e71a586de7e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.20
 
+  *) mod_proxy_express: Fix possible use of DB handle after close.  PR 59230.
+     [Petr <pgajdos suse.cz>]
+     
   *) core/util_script: relax alphanumeric filter of enviroment variable names
      on Windows to allow '(' and ')' for passing PROGRAMFILES(X86) et.al.
      unadulterated in 64 bit versions of Windows. PR 46751.  
diff --git a/STATUS b/STATUS
index 3728063c90b9c45b104958496b2db7c31844691f..987a2ddd947e0271822d6853b7bb5d7b300b9572 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -113,11 +113,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_proxy_express: Fix possible use of DB handle after close.  PR 59230.
-     trunk patch: http://svn.apache.org/r1737014
-     2.4.x patch: trunk works (modulo CHANGES)
-     +1: ylavic, trawick, wrowe
-
   *) core: Do not read .htaccess if AllowOverride and AllowOverrideList
      are "None". PR 58528.
      trunk patch: http://svn.apache.org/r1737114
index 9904fbbd7e82b178a09c9d27c344cefd24eec1d8..ec4b94a67d79b4985a9a19e7f05bc632649533a8 100644 (file)
@@ -145,13 +145,11 @@ static int xlate_name(request_rec *r)
     key.dsize = strlen(key.dptr);
 
     rv = apr_dbm_fetch(db, key, &val);
-    apr_dbm_close(db);
-    if (rv != APR_SUCCESS) {
-        return DECLINED;
+    if (rv == APR_SUCCESS) {
+        backend = apr_pstrmemdup(r->pool, val.dptr, val.dsize);
     }
-
-    backend = apr_pstrmemdup(r->pool, val.dptr, val.dsize);
-    if (!backend) {
+    apr_dbm_close(db);
+    if (rv != APR_SUCCESS || !backend) {
         return DECLINED;
     }