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

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