diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-07 18:11:38 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-07 18:11:38 +0000 |
commit | 473fc549d3fdeeb4866d70b198aed88d949499d6 (patch) | |
tree | 46a7201a5c84ea5d71ec522fbd006ab424fb95c5 /sys/lib/libsa | |
parent | 2b22a9c47d60ee719cc2eaf2ca5981ce91e4ce3b (diff) |
plug a memory leak
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r-- | sys/lib/libsa/loadfile.c | 5 |
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); } /* |