summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-05-07 18:11:38 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-05-07 18:11:38 +0000
commit473fc549d3fdeeb4866d70b198aed88d949499d6 (patch)
tree46a7201a5c84ea5d71ec522fbd006ab424fb95c5
parent2b22a9c47d60ee719cc2eaf2ca5981ce91e4ce3b (diff)
plug a memory leak
-rw-r--r--sys/lib/libsa/loadfile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/lib/libsa/loadfile.c b/sys/lib/libsa/loadfile.c
index 16918f929bb..6262f0a0d2c 100644
--- a/sys/lib/libsa/loadfile.c
+++ b/sys/lib/libsa/loadfile.c
@@ -1,5 +1,5 @@
/* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */
-/* $OpenBSD: loadfile.c,v 1.3 2002/11/11 00:04:30 mickey Exp $ */
+/* $OpenBSD: loadfile.c,v 1.4 2003/05/07 18:11:37 mickey Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -359,7 +359,6 @@ elf_exec(fd, elf, marks, flags)
return 1;
}
sz = elf->e_shnum * sizeof(Elf_Shdr);
-
shp = ALLOC(sz);
if (read(fd, shp, sz) != sz) {
@@ -409,11 +408,11 @@ elf_exec(fd, elf, marks, flags)
}
if (flags & LOAD_SYM) {
BCOPY(shp, shpp, sz);
- FREE(shp, sz);
if (havesyms && first == 0)
PROGRESS(("]"));
}
+ FREE(shp, sz);
}
/*