httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1737014 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_express.c
Date Tue, 29 Mar 2016 15:48:00 GMT
Author: ylavic
Date: Tue Mar 29 15:48:00 2016
New Revision: 1737014

URL: http://svn.apache.org/viewvc?rev=1737014&view=rev
Log:
mod_proxy_express: Fix possible use of DB handle after close.
PR 59230.

Submitted by: Petr <pgajdos suse.cz>
Reviewed/Committed by: ylavic

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/mod_proxy_express.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1737014&r1=1737013&r2=1737014&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Mar 29 15:48:00 2016
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy_express: Fix possible use of DB handle after close.  PR 59230.
+     [Petr <pgajdos suse.cz>]
+     
   *) mod_http2: more efficient passing of response bodies with less contention
      and file bucket forwarding. [Stefan Eissing] 
      

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_express.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_express.c?rev=1737014&r1=1737013&r2=1737014&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_express.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_express.c Tue Mar 29 15:48:00 2016
@@ -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;
     }
 



Mime
View raw message