summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/rtld-elf/libmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libexec/rtld-elf/libmap.c b/libexec/rtld-elf/libmap.c
index c6afd57ea3de..561e8e3d7508 100644
--- a/libexec/rtld-elf/libmap.c
+++ b/libexec/rtld-elf/libmap.c
@@ -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;