Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/arch fix leak



details:   https://anonhg.NetBSD.org/src/rev/a8848804c4af
branches:  trunk
changeset: 332453:a8848804c4af
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Sep 21 16:58:42 2014 +0000

description:
fix leak

diffstat:

 sys/compat/linux/arch/i386/linux_ptrace.c    |  7 ++++---
 sys/compat/linux/arch/powerpc/linux_ptrace.c |  6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 626b2ccceeba -r a8848804c4af sys/compat/linux/arch/i386/linux_ptrace.c
--- a/sys/compat/linux/arch/i386/linux_ptrace.c Sun Sep 21 16:56:44 2014 +0000
+++ b/sys/compat/linux/arch/i386/linux_ptrace.c Sun Sep 21 16:58:42 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_ptrace.c,v 1.28 2014/04/15 17:53:09 maxv Exp $   */
+/*     $NetBSD: linux_ptrace.c,v 1.29 2014/09/21 16:58:42 christos Exp $       */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.28 2014/04/15 17:53:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.29 2014/09/21 16:58:42 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -182,7 +182,8 @@
        mutex_enter(proc_lock);
        if ((t = proc_find(SCARG(uap, pid))) == NULL) {
                mutex_exit(proc_lock);
-               return ESRCH;
+               error = ESRCH;
+               goto out;
        }
        mutex_enter(t->p_lock);
        mutex_exit(proc_lock);
diff -r 626b2ccceeba -r a8848804c4af sys/compat/linux/arch/powerpc/linux_ptrace.c
--- a/sys/compat/linux/arch/powerpc/linux_ptrace.c      Sun Sep 21 16:56:44 2014 +0000
+++ b/sys/compat/linux/arch/powerpc/linux_ptrace.c      Sun Sep 21 16:58:42 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_ptrace.c,v 1.25 2014/04/15 17:53:09 maxv Exp $ */
+/*     $NetBSD: linux_ptrace.c,v 1.26 2014/09/21 16:59:08 christos Exp $ */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.25 2014/04/15 17:53:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.26 2014/09/21 16:59:08 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -159,7 +159,7 @@
        mutex_enter(proc_lock);
        if ((t = proc_find(SCARG(uap, pid))) == NULL) {
                mutex_exit(proc_lock);
-               return ESRCH;
+               goto out;
        }
        mutex_enter(t->p_lock);
        mutex_exit(proc_lock);



Home | Main Index | Thread Index | Old Index