svn commit: r325102 - head/libexec/rtld-elf
Edward Tomasz Napierala
trasz at FreeBSD.org
Sun Oct 29 12:07:28 UTC 2017
Author: trasz
Date: Sun Oct 29 12:07:27 2017
New Revision: 325102
URL: https://svnweb.freebsd.org/changeset/base/325102
Log:
Plug memory leak on error case.
Reported by: Coverity
CID: 1382112
MFC after: 2 weeks
Modified:
head/libexec/rtld-elf/libmap.c
Modified: head/libexec/rtld-elf/libmap.c
==============================================================================
--- head/libexec/rtld-elf/libmap.c Sun Oct 29 12:03:06 2017 (r325101)
+++ head/libexec/rtld-elf/libmap.c Sun Oct 29 12:07:27 2017 (r325102)
@@ -133,6 +133,7 @@ lmc_parse_file(char *path)
retval = read(fd, lm_map, st.st_size);
if (retval != st.st_size) {
close(fd);
+ free(lm_map);
dbg("lm_parse_file: read(\"%s\") failed, %s", path,
rtld_strerror(errno));
return;
More information about the svn-src-all
mailing list