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