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

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

@@ -3847,6 +3847,7 @@ log__open_auditlogfile(int logfile_state, int locked)
 				 */
 				if (PR_FILE_EXISTS_ERROR != prerr) {
 					if (!locked) LOG_AUDIT_UNLOCK_WRITE();
+					slapi_ch_free((void**)&log);
 					return LOG_UNABLE_TO_OPENFILE;
 				}
 			}