summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2019-07-17 11:40:14 +0000
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>2019-07-17 11:40:14 +0000
commitf14314a8b6e8a29331da528678fd01942eb52e20 (patch)
treef117212f0f73dfeffdee5e81fda0bcaa6b26d0f6
parentc900518ed81e70f8025f3eea67bff286fe3cb7a2 (diff)
downloadlibapr-f14314a8b6e8a29331da528678fd01942eb52e20.tar.gz
* 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
-rw-r--r--memory/unix/apr_pools.c4
1 files changed, 4 insertions, 0 deletions
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) {