Plug memory leak on error case.

Reported by:	Coverity
CID:		1382112
MFC after:	2 weeks
This commit is contained in:
trasz 2017-10-29 12:07:27 +00:00
parent 112f0f8958
commit bedd65c99d

View File

@ -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;