diff options
author | Rainer Jung <rjung@apache.org> | 2019-07-17 11:40:14 +0000 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2019-07-17 11:40:14 +0000 |
commit | 12d53bd39966742ed97bc1b6cca6cb930fec2a5a (patch) | |
tree | f117212f0f73dfeffdee5e81fda0bcaa6b26d0f6 | |
parent | 225c3b01992a49d12f82c02190e95d1ef06514af (diff) | |
download | apr-12d53bd39966742ed97bc1b6cca6cb930fec2a5a.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: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1863207 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | memory/unix/apr_pools.c | 4 |
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) { |