diff --git a/libs/apr/misc/unix/otherchild.c b/libs/apr/misc/unix/otherchild.c index 427a57e7e4..c97cfdd644 100644 --- a/libs/apr/misc/unix/otherchild.c +++ b/libs/apr/misc/unix/otherchild.c @@ -96,7 +96,7 @@ APR_DECLARE(void) apr_proc_other_child_unregister(void *data) } /* segfault if this function called with invalid parm */ - apr_pool_cleanup_kill(cur->p, cur->data, other_child_cleanup); + if (cur) apr_pool_cleanup_kill(cur->p, cur->data, other_child_cleanup); other_child_cleanup(data); } diff --git a/libs/apr/tables/apr_hash.c b/libs/apr/tables/apr_hash.c index 4e3723e19f..5cac297af9 100644 --- a/libs/apr/tables/apr_hash.c +++ b/libs/apr/tables/apr_hash.c @@ -459,7 +459,7 @@ APR_DECLARE(apr_hash_t *) apr_hash_merge(apr_pool_t *p, break; } } - if (!ent) { + if (new_vals && !ent) { new_vals[j].klen = iter->klen; new_vals[j].key = iter->key; new_vals[j].val = iter->val;