apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1183737 - in /apr/apr-util/branches/1.4.x: CHANGES memcache/apr_memcache.c
Date Sat, 15 Oct 2011 21:42:24 GMT
Author: sf
Date: Sat Oct 15 21:42:23 2011
New Revision: 1183737

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

    Fix possible segfault.

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


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

Modified: apr/apr-util/branches/1.4.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?rev=1183737&r1=1183736&r2=1183737&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.4.x/CHANGES [utf-8] Sat Oct 15 21:42:23 2011
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.4.0
 
+  *) apr_memcache_server_create: Fix possible segfault. PR 51064.
+     [Michajlo Matijkiw <michajlo_matijkiw comcast com>]
+
   *) apr_thread_pool: Fix thread unsafe pool usage. [Stefan Fritsch]
 
   *) Do not include apr.h and apr_errno.h from system search path in

Modified: apr/apr-util/branches/1.4.x/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/memcache/apr_memcache.c?rev=1183737&r1=1183736&r2=1183737&view=diff
==============================================================================
--- apr/apr-util/branches/1.4.x/memcache/apr_memcache.c (original)
+++ apr/apr-util/branches/1.4.x/memcache/apr_memcache.c Sat Oct 15 21:42:23 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