From 000cd2291d3d2c40682ec607e8d3b0711ac5a097 Mon Sep 17 00:00:00 2001
From: Joe Orton <jorton@apache.org>
Date: Mon, 20 Jan 2025 10:24:13 +0000
Subject: [PATCH] Merge r1921067 from trunk:

* Take care for the case where nkey is NULL

PR: 69358
Reported by: <zhora.budyukin111 gmail.com>
Submitted by: rpluem
Reviewed by: jailletc36, rjung, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1923247 13f79535-47bb-0310-9956-ffa450edef68

Conflict:NA
Reference:https://github.com/apache/httpd/commit/000cd2291d3d2c40682ec607e8d3b0711ac5a097
---
 modules/cache/mod_cache_socache.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c
index f369004..341db53 100644
--- a/modules/cache/mod_cache_socache.c
+++ b/modules/cache/mod_cache_socache.c
@@ -694,9 +694,11 @@ fail:
             return DECLINED;
         }
     }
-    conf->provider->socache_provider->remove(
-            conf->provider->socache_instance, r->server,
-            (unsigned char *) nkey, strlen(nkey), r->pool);
+    if (nkey) {
+        conf->provider->socache_provider->remove(
+                conf->provider->socache_instance, r->server,
+                (unsigned char *) nkey, strlen(nkey), r->pool);
+    }
     if (socache_mutex) {
         apr_status_t status = apr_global_mutex_unlock(socache_mutex);
         if (status != APR_SUCCESS) {
-- 
2.33.0

