mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Plug memory leak on error case.
Reported by: Coverity CID: 1382112 MFC after: 2 weeks
This commit is contained in:
parent
338ed98ad2
commit
152036a0f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325102
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user