summaryrefslogtreecommitdiff
path: root/memory/unix
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2011-03-16 15:58:15 +0000
committerJoe Orton <jorton@apache.org>2011-03-16 15:58:15 +0000
commit6ac0e7e46e669e82e24ceb5d3841cd4a1bbfcdf3 (patch)
tree6966b3aaa7c5273c361a7a552670cc43cc304274 /memory/unix
parent904aecf3a99f2c81c119f76ef7203c9637146420 (diff)
downloadapr-6ac0e7e46e669e82e24ceb5d3841cd4a1bbfcdf3.tar.gz
* memory/unix/apr_pools.c (apr_pool_cleanup_register):
[APR_POOL_DEBUG]: Catch NULL arguments which would lead to strange segfaults later. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1082177 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory/unix')
-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 96aff7a08..c0d470b03 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -2205,6 +2205,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) {