apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1183736 - /apr/apr-util/branches/1.5.x/memcache/apr_memcache.c
Date Sat, 15 Oct 2011 21:41:26 GMT
Author: sf
Date: Sat Oct 15 21:41:25 2011
New Revision: 1183736

URL: http://svn.apache.org/viewvc?rev=1183736&view=rev
Log:
Backport r1183689:

    Fix possible segfault.

    PR: 51064
    Submitted by: Michajlo Matijkiw <michajlo_matijkiw comcast com>


Modified:
    apr/apr-util/branches/1.5.x/memcache/apr_memcache.c

Modified: apr/apr-util/branches/1.5.x/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/memcache/apr_memcache.c?rev=1183736&r1=1183735&r2=1183736&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/memcache/apr_memcache.c (original)
+++ apr/apr-util/branches/1.5.x/memcache/apr_memcache.c Sat Oct 15 21:41:25 2011
@@ -418,15 +418,17 @@ APU_DECLARE(apr_status_t) apr_memcache_s
                                mc_conn_construct,       /* Make a New Connection */
                                mc_conn_destruct,        /* Kill Old Connection */
                                server, np);
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
 
     apr_reslist_cleanup_order_set(server->conns, APR_RESLIST_CLEANUP_FIRST);
 #else
     rv = mc_conn_construct((void**)&(server->conn), server, np);
-#endif
-
     if (rv != APR_SUCCESS) {
         return rv;
     }
+#endif
 
     *ms = server;
 



Mime
View raw message