apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1183689 - in /apr/apr/trunk: CHANGES memcache/apr_memcache.c
Date Sat, 15 Oct 2011 20:49:41 GMT
Author: sf
Date: Sat Oct 15 20:49:40 2011
New Revision: 1183689

URL: http://svn.apache.org/viewvc?rev=1183689&view=rev
Log:
Fix possible segfault.

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

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/memcache/apr_memcache.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1183689&r1=1183688&r2=1183689&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Sat Oct 15 20:49:40 2011
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) apr_memcache_server_create: Fix possible segfault. PR 51064.
+     [Michajlo Matijkiw <michajlo_matijkiw comcast com>]
+
   *) apr_dir_make_recursive: Fix race condition that could lead to EEXIST
      being returned. PR 51254. [William Lee <william lee rainstor com>,
      Wim Lewis <wiml omnigroup com>]

Modified: apr/apr/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/memcache/apr_memcache.c?rev=1183689&r1=1183688&r2=1183689&view=diff
==============================================================================
--- apr/apr/trunk/memcache/apr_memcache.c (original)
+++ apr/apr/trunk/memcache/apr_memcache.c Sat Oct 15 20:49:40 2011
@@ -418,15 +418,17 @@ APR_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