Browse Source

Ticket #48122 nunc-stans FD leak

https://fedorahosted.org/389/ticket/48122
Reviewed by: mreynolds (Thanks!)
Branch: master
Fix Description: Called connection acquire from within a PR_ASSERT so
the code was only called with DEBUG active.
Platforms tested: Fedora 20, EL7
Flag Day: no
Doc impact: no
Rich Megginson 10 năm trước cách đây
mục cha
commit
1bf67a4fff
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      ldap/servers/slapd/conntable.c

+ 3 - 1
ldap/servers/slapd/conntable.c

@@ -355,7 +355,9 @@ connection_table_move_connection_on_to_active_list(Connection_Table *ct,Connecti
 
 	PR_Lock(ct->table_mutex);
 
-	PR_ASSERT(0 == connection_acquire_nolock (c));
+	if (connection_acquire_nolock (c)) {
+		PR_ASSERT(0);
+	}
 
 #ifdef FOR_DEBUGGING
     slapi_log_error(SLAPI_LOG_FATAL, "connection", "Moving connection into active list\n");