Browse Source

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 11980.
description: The log__open_accesslogfile() has been modified to release log when an error occurs.
Endi S. Dewata 15 years ago
parent
commit
ac1498b9a3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ldap/servers/slapd/log.c

+ 1 - 0
ldap/servers/slapd/log.c

@@ -2181,6 +2181,7 @@ log__open_accesslogfile(int logfile_state, int locked)
 				if (PR_FILE_EXISTS_ERROR != prerr) {
 					loginfo.log_access_fdes = NULL;
     					if (!locked)  LOG_ACCESS_UNLOCK_WRITE();
+					slapi_ch_free((void**)&log);
 					return LOG_UNABLE_TO_OPENFILE;
 				}
 			}