You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rp...@apache.org on 2008/08/12 20:47:05 UTC

svn commit: r685262 - /apr/apr-util/branches/1.3.x/memcache/apr_memcache.c

Author: rpluem
Date: Tue Aug 12 11:47:05 2008
New Revision: 685262

URL: http://svn.apache.org/viewvc?rev=685262&view=rev
Log:
* Fix a memory leak introduced in r683756 and a free call to a non malloced
  pointer in the case that the platform has no threads.
  Remark: This is not a backport from trunk since code in trunk works
  differently. On trunk we use the possibility to run pre cleanups on pool
  destruction.

Pointed out by: trawick

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

Modified: apr/apr-util/branches/1.3.x/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/memcache/apr_memcache.c?rev=685262&r1=685261&r2=685262&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/memcache/apr_memcache.c (original)
+++ apr/apr-util/branches/1.3.x/memcache/apr_memcache.c Tue Aug 12 11:47:05 2008
@@ -343,6 +343,9 @@
 
     if (rv != APR_SUCCESS) {
         apr_pool_destroy(np);
+#if APR_HAS_THREADS
+        free(conn);
+#endif
         return rv;
     }
 
@@ -359,7 +362,9 @@
     rv = conn_connect(conn);
     if (rv != APR_SUCCESS) {
         apr_pool_destroy(np);
+#if APR_HAS_THREADS
         free(conn);
+#endif
     }
     else {
         apr_pool_cleanup_register(np, conn, conn_clean, apr_pool_cleanup_null);



Re: svn commit: r685262 - /apr/apr-util/branches/1.3.x/memcache/apr_memcache.c

Posted by Bojan Smojver <bo...@rexursive.com>.
On Tue, 2008-08-12 at 18:28 -0500, William A. Rowe, Jr. wrote:

> We might want to note this one in CHANGES, if only to communicate why
> there was no 1.3.3 apr-util?

Done.

-- 
Bojan


Re: svn commit: r685262 - /apr/apr-util/branches/1.3.x/memcache/apr_memcache.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
rpluem@apache.org wrote:
> Author: rpluem
> Date: Tue Aug 12 11:47:05 2008
> New Revision: 685262
> 
> URL: http://svn.apache.org/viewvc?rev=685262&view=rev
> Log:
> * Fix a memory leak introduced in r683756 and a free call to a non malloced
>   pointer in the case that the platform has no threads.
>   Remark: This is not a backport from trunk since code in trunk works
>   differently. On trunk we use the possibility to run pre cleanups on pool
>   destruction.

We might want to note this one in CHANGES, if only to communicate why
there was no 1.3.3 apr-util?