Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa/stand/mkboot PR/50684: David Binderman: Fix me...
details: https://anonhg.NetBSD.org/src/rev/6eb16c5a6c29
branches: trunk
changeset: 343062:6eb16c5a6c29
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 21 17:00:23 2016 +0000
description:
PR/50684: David Binderman: Fix memory leak
diffstat:
sys/arch/hppa/stand/mkboot/mkboot.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r b8a3d5e6d66e -r 6eb16c5a6c29 sys/arch/hppa/stand/mkboot/mkboot.c
--- a/sys/arch/hppa/stand/mkboot/mkboot.c Thu Jan 21 16:58:36 2016 +0000
+++ b/sys/arch/hppa/stand/mkboot/mkboot.c Thu Jan 21 17:00:23 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkboot.c,v 1.1 2014/02/24 07:23:43 skrll Exp $ */
+/* $NetBSD: mkboot.c,v 1.2 2016/01/21 17:00:23 christos Exp $ */
/* $OpenBSD: mkboot.c,v 1.9 2001/05/17 00:57:55 pvalchev Exp $ */
@@ -234,7 +234,7 @@
int from, check_sum = 0;
struct hppa_lifload load;
Elf32_External_Ehdr elf_header;
- Elf32_External_Phdr *elf_segments;
+ Elf32_External_Phdr *elf_segments = NULL;
int i, header_count, memory_needed, elf_load_image_segment;
if ((from = open(from_file, O_RDONLY)) < 0)
@@ -356,6 +356,7 @@
if (close(from) < 0)
err(1, "%s", from_file);
+ free(elf_segments);
return total;
}
Home |
Main Index |
Thread Index |
Old Index