Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix memory leak.
details: https://anonhg.NetBSD.org/src/rev/6103a40064a4
branches: trunk
changeset: 326710:6103a40064a4
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Feb 14 07:30:07 2014 +0000
description:
Fix memory leak.
ok christos@ agc@
diffstat:
sys/kern/exec_elf.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 65a62e8531df -r 6103a40064a4 sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c Fri Feb 14 07:29:06 2014 +0000
+++ b/sys/kern/exec_elf.c Fri Feb 14 07:30:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.54 2014/01/25 19:44:11 christos Exp $ */
+/* $NetBSD: exec_elf.c,v 1.55 2014/02/14 07:30:07 maxv Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.54 2014/01/25 19:44:11 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.55 2014/02/14 07:30:07 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -823,6 +823,7 @@
if ((error = elf_load_file(l, epp, interp,
&epp->ep_vmcmds, &interp_offset, ap, &pos)) != 0) {
+ kmem_free(ap, sizeof(*ap));
goto bad;
}
ap->arg_interp = epp->ep_vmcmds.evs_cmds[j].ev_addr;
Home |
Main Index |
Thread Index |
Old Index