Blame SOURCES/0009-Ticket-48203-Fix-coverity-issues-07-07-2015.patch

a2f18f
From 4b532c2fde59790981142e3245535a0176bb7e4f Mon Sep 17 00:00:00 2001
a2f18f
From: Noriko Hosoi <nhosoi@redhat.com>
a2f18f
Date: Tue, 7 Jul 2015 12:54:38 -0700
a2f18f
Subject: [PATCH] Ticket #48203 - Fix coverity issues - 07/07/2015
a2f18f
a2f18f
Description:
a2f18f
1. Defect type: CLANG_WARNING
a2f18f
   389-ds-base-1.3.4.0/ldap/servers/slapd/conntable.c:161:11: warning:
a2f18f
   Access to field 'c_ct' results in a dereference of a null pointer
a2f18f
   (loaded from variable 'c')
a2f18f
a2f18f
Thanks to rmeggins@redhat.com for the advice:
a2f18f
> PR_NewLock() returns NULL then the server is severely out of some
a2f18f
> resource (like RAM, stack space, etc.) and probably should just exit.
a2f18f
a2f18f
https://fedorahosted.org/389/ticket/48203#comment:8
a2f18f
(cherry picked from commit bca0908b1e10ada69cdc051d4aaceda73a940597)
a2f18f
(cherry picked from commit a741911c9a5090d78f7a81c475bea3f6593d72ad)
a2f18f
---
a2f18f
 ldap/servers/slapd/conntable.c | 2 +-
a2f18f
 1 file changed, 1 insertion(+), 1 deletion(-)
a2f18f
a2f18f
diff --git a/ldap/servers/slapd/conntable.c b/ldap/servers/slapd/conntable.c
a2f18f
index 0364d94..d5b9058 100644
a2f18f
--- a/ldap/servers/slapd/conntable.c
a2f18f
+++ b/ldap/servers/slapd/conntable.c
a2f18f
@@ -147,7 +147,7 @@ connection_table_get_connection(Connection_Table *ct, int sd)
a2f18f
 				c->c_mutex = NULL;
a2f18f
 				c->c_pdumutex = NULL;
a2f18f
 				LDAPDebug( LDAP_DEBUG_ANY,"PR_NewLock failed\n",0, 0, 0 );
a2f18f
-				c= NULL;
a2f18f
+				exit(1);
a2f18f
 			}
a2f18f
 		}
a2f18f
 		/* Let's make sure there's no cruft left on there from the last time this connection was used. */
a2f18f
-- 
a2f18f
1.9.3
a2f18f