Blame SOURCES/0036-SBUS-do-not-try-to-del-non-existing-sender.patch

bac598
From bdf461c7577c458d7b2a785b2007c0ccae73e3f7 Mon Sep 17 00:00:00 2001
bac598
From: Alexey Tikhonov <atikhono@redhat.com>
bac598
Date: Mon, 11 Jan 2021 18:28:02 +0100
bac598
Subject: [PATCH] SBUS: do not try to del non existing sender
bac598
MIME-Version: 1.0
bac598
Content-Type: text/plain; charset=UTF-8
bac598
Content-Transfer-Encoding: 8bit
bac598
bac598
Resolves: https://github.com/SSSD/sssd/issues/5425
bac598
bac598
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
bac598
---
bac598
 src/sbus/request/sbus_request_sender.c | 9 +++++----
bac598
 1 file changed, 5 insertions(+), 4 deletions(-)
bac598
bac598
diff --git a/src/sbus/request/sbus_request_sender.c b/src/sbus/request/sbus_request_sender.c
bac598
index cecb188b0..39cdec064 100644
bac598
--- a/src/sbus/request/sbus_request_sender.c
bac598
+++ b/src/sbus/request/sbus_request_sender.c
bac598
@@ -101,10 +101,11 @@ void
bac598
 sbus_senders_delete(hash_table_t *table,
bac598
                     const char *name)
bac598
 {
bac598
-    DEBUG(SSSDBG_TRACE_INTERNAL, "Removing identity of sender [%s]\n",
bac598
-          name);
bac598
-
bac598
-    sss_ptr_hash_delete(table, name, true);
bac598
+    if (sss_ptr_hash_has_key(table, name)) {
bac598
+        DEBUG(SSSDBG_TRACE_INTERNAL, "Removing identity of sender [%s]\n",
bac598
+              name);
bac598
+        sss_ptr_hash_delete(table, name, true);
bac598
+    }
bac598
 }
bac598
 
bac598
 errno_t
bac598
-- 
bac598
2.21.3
bac598