Commit 9f1492f5 authored by Bill Stoddard's avatar Bill Stoddard
Browse files

Fix segfault triggered when the malloc() in find_entry() fails.

Patch submitted by "Jean-Jacques Clar" <JJCLAR@novell.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95034 13f79535-47bb-0310-9956-ffa450edef68
parent a518bcbb
Loading
Loading
Loading
Loading
+2 −1
Changes for modules/experimental/cache_hash.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -293,7 +293,8 @@ CACHE_DECLARE(void *) cache_hash_set(cache_hash_t *ht,
    cache_hash_entry_t **hep, *tmp;
    const void *tval;
    hep = find_entry(ht, key, klen, val);
    if (*hep) {
    /* If hep == NULL, then the malloc() in find_entry failed */
    if (hep && *hep) {
        if (!val) {
            /* delete entry */
            tval = (*hep)->val;