diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2021-07-02 13:35:25 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2021-07-02 13:35:25 +0000 |
commit | 2413415fceab2d6d3a1950f67dfa41d46ba98633 (patch) | |
tree | 983d89e54b6fbe2f04176642a1a5e771ed08560c /memory | |
parent | 9f5c9e7edd49b6a5befdd4505ccfd20ddb791ab7 (diff) | |
download | libapr-2413415fceab2d6d3a1950f67dfa41d46ba98633.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')
-rw-r--r-- | memory/unix/apr_pools.c | 2 |
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; } } |