Browse Source

609255 - fix coverity Defect Type: Memory - illegal accesses issues

https://bugzilla.redhat.com/show_bug.cgi?id=609255

12224 UNINIT Triaged Unassigned Bug Minor Fix Required
windows_private_update_dirsync_control() ds/ldap/servers/plugins/replication/windows_private.c

Comment:
If DIRSYNC control is not found, uninitialized ber is passed to
ber_free.  We should init ber to NULL.
Noriko Hosoi 15 years ago
parent
commit
9c29bdbfa1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ldap/servers/plugins/replication/windows_private.c

+ 1 - 1
ldap/servers/plugins/replication/windows_private.c

@@ -582,7 +582,7 @@ void windows_private_update_dirsync_control(const Repl_Agmt *ra,LDAPControl **co
     int foundDirsyncControl;
 	int i;
 	LDAPControl *dirsync = NULL;
-	BerElement *ber;
+	BerElement *ber = NULL;
 	ber_int_t hasMoreData;
 	ber_int_t maxAttributeCount;
 	BerValue  *serverCookie;