summaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2014-07-16 18:10:33 +0000
committerYann Ylavic <ylavic@apache.org>2014-07-16 18:10:33 +0000
commit3f0154e42ccd2fa81bec7e8b5449519a23eee2b4 (patch)
treeb2d66dcbe55291cba35ccd587701fcca12e6aa6c /tables
parent621ce54e0492072a3258ddb3ffd9967170c989a7 (diff)
downloadapr-3f0154e42ccd2fa81bec7e8b5449519a23eee2b4.tar.gz
Call free() on the skiplist structure in apr_skiplist_destroy() if it was
apr_skiplist_init()ialized without a pool (ie. malloc()ed). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1611120 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r--tables/apr_skiplist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c
index 3cd05e4cd..25d20e309 100644
--- a/tables/apr_skiplist.c
+++ b/tables/apr_skiplist.c
@@ -629,6 +629,9 @@ APR_DECLARE(void) apr_skiplist_destroy(apr_skiplist *sl, apr_skiplist_freefunc m
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)