Blame SOURCES/0004-Issue-5085-Race-condition-about-snmp-collator-at-sta.patch

0a5078
From 16536e5d306727761ffd10403f4762956f177147 Mon Sep 17 00:00:00 2001
0a5078
From: progier389 <progier@redhat.com>
0a5078
Date: Wed, 5 Jan 2022 12:09:27 +0100
0a5078
Subject: [PATCH] Issue 5085 - Race condition about snmp collator at startup
0a5078
 (#5086)
0a5078
0a5078
---
0a5078
 ldap/servers/slapd/snmp_collator.c | 3 +--
0a5078
 1 file changed, 1 insertion(+), 2 deletions(-)
0a5078
0a5078
diff --git a/ldap/servers/slapd/snmp_collator.c b/ldap/servers/slapd/snmp_collator.c
0a5078
index 10a99475d..ed34d2ac4 100644
0a5078
--- a/ldap/servers/slapd/snmp_collator.c
0a5078
+++ b/ldap/servers/slapd/snmp_collator.c
0a5078
@@ -201,7 +201,7 @@ set_snmp_interaction_row(char *host, int port, int error)
0a5078
 
0a5078
     /* The interactions table is using the default (first) snmp_vars*/
0a5078
     snmp_vars = g_get_first_thread_snmp_vars(&cookie);
0a5078
-    if (snmp_vars == NULL)
0a5078
+    if (snmp_vars == NULL || interaction_table_mutex == NULL)
0a5078
         return;
0a5078
 
0a5078
     /* stevross: our servers don't have a concept of dsName as a distinguished name
0a5078
@@ -856,7 +856,6 @@ snmp_update_cache_stats(void)
0a5078
 
0a5078
         if (search_result == 0) {
0a5078
             int cookie;
0a5078
-            uint64_t total;
0a5078
             struct snmp_vars_t *snmp_vars;
0a5078
             slapi_pblock_get(search_result_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES,
0a5078
                              &search_entries);
0a5078
-- 
0a5078
2.31.1
0a5078