1
0
Эх сурвалжийг харах

Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053

https://bugzilla.redhat.com/show_bug.cgi?id=619122
Resolves: bug 619122
Bug description: fix coverify Defect Type: Resource leaks issues CID 11998.
description: The str2entry_fast() has been modified to release maxcsn before returning.
Endi S. Dewata 15 жил өмнө
parent
commit
81fa2c1b64

+ 2 - 0
ldap/servers/slapd/entry.c

@@ -529,6 +529,7 @@ str2entry_fast( const char *rawdn, char *s, int flags, int read_stateinfo )
 	if (read_stateinfo && maxcsn)
 	{
 		e->e_maxcsn = maxcsn;
+		maxcsn = NULL;
 	}
 
 	/* release read lock of name2asi, per-entry lock */
@@ -545,6 +546,7 @@ str2entry_fast( const char *rawdn, char *s, int flags, int read_stateinfo )
 
 done:
 	csn_free(&attributedeletioncsn);
+	csn_free(&maxcsn);
 	LDAPDebug( LDAP_DEBUG_TRACE, "<= str2entry_fast 0x%x\n",
 		e, 0, 0 );
 	return( e );