1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Plug memory leak on error case.

Reported by:	Coverity
CID:		1382112
MFC after:	2 weeks
This commit is contained in:
Edward Tomasz Napierala 2017-10-29 12:07:27 +00:00
parent 338ed98ad2
commit 152036a0f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325102

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;