From f14314a8b6e8a29331da528678fd01942eb52e20 Mon Sep 17 00:00:00 2001 From: rjung Date: Wed, 17 Jul 2019 11:40:14 +0000 Subject: * memory/unix/apr_pools.c (apr_pool_cleanup_register): [APR_POOL_DEBUG]: Catch NULL arguments which would lead to strange segfaults later. Backport of r1082177 from trunk resp. r1863198 from 1.7.x. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1863207 13f79535-47bb-0310-9956-ffa450edef68 --- memory/unix/apr_pools.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c index 524e9acb4..3361f7a7d 100644 --- a/memory/unix/apr_pools.c +++ b/memory/unix/apr_pools.c @@ -2484,6 +2484,10 @@ APR_DECLARE(void) apr_pool_cleanup_register(apr_pool_t *p, const void *data, #if APR_POOL_DEBUG apr_pool_check_integrity(p); + + if (!p || !plain_cleanup_fn || !child_cleanup_fn) { + abort(); + } #endif /* APR_POOL_DEBUG */ if (p != NULL) { -- cgit v1.2.1