You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2014/07/16 20:10:33 UTC
svn commit: r1611120 - /apr/apr/trunk/tables/apr_skiplist.c
Author: ylavic
Date: Wed Jul 16 18:10:33 2014
New Revision: 1611120
URL: http://svn.apache.org/r1611120
Log:
Call free() on the skiplist structure in apr_skiplist_destroy() if it was
apr_skiplist_init()ialized without a pool (ie. malloc()ed).
Modified:
apr/apr/trunk/tables/apr_skiplist.c
Modified: apr/apr/trunk/tables/apr_skiplist.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/tables/apr_skiplist.c?rev=1611120&r1=1611119&r2=1611120&view=diff
==============================================================================
--- apr/apr/trunk/tables/apr_skiplist.c (original)
+++ apr/apr/trunk/tables/apr_skiplist.c Wed Jul 16 18:10:33 2014
@@ -629,6 +629,9 @@ APR_DECLARE(void) apr_skiplist_destroy(a
while (apr_skiplist_pop(sl->index, skiplisti_destroy) != NULL)
;
apr_skiplist_remove_all(sl, myfree);
+ if (!sl->pool) {
+ free(sl);
+ }
}
APR_DECLARE(apr_skiplist *) apr_skiplist_merge(apr_skiplist *sl1, apr_skiplist *sl2)