Преглед на файлове

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 години
родител
ревизия
9c29bdbfa1
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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 foundDirsyncControl;
 	int i;
 	int i;
 	LDAPControl *dirsync = NULL;
 	LDAPControl *dirsync = NULL;
-	BerElement *ber;
+	BerElement *ber = NULL;
 	ber_int_t hasMoreData;
 	ber_int_t hasMoreData;
 	ber_int_t maxAttributeCount;
 	ber_int_t maxAttributeCount;
 	BerValue  *serverCookie;
 	BerValue  *serverCookie;