summaryrefslogtreecommitdiff
path: root/memory/unix
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2021-07-02 13:35:25 +0000
committerJoe Orton <jorton@apache.org>2021-07-02 13:35:25 +0000
commit4accca566db5f31ba21d85ef9b121e19e0a4e363 (patch)
tree983d89e54b6fbe2f04176642a1a5e771ed08560c /memory/unix
parent360067271bc70745df724427e8d9303cf0645dee (diff)
downloadapr-4accca566db5f31ba21d85ef9b121e19e0a4e363.tar.gz
* memory/unix/apr_pools.c (apr_pool_create_unmanaged_ex): Destroy the
allocator if node allocation fails, rather than leaking it. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891202 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory/unix')
-rw-r--r--memory/unix/apr_pools.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index b0f4c9ba0..2408655ec 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -1166,6 +1166,8 @@ APR_DECLARE(apr_status_t) apr_pool_create_unmanaged_ex(apr_pool_t **newpool,
if (abort_fn)
abort_fn(APR_ENOMEM);
+ apr_allocator_destroy(pool_allocator);
+
return APR_ENOMEM;
}
}