Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/common Free pathbuf in an error path.



details:   https://anonhg.NetBSD.org/src/rev/a89e9ff65d5f
branches:  trunk
changeset: 792053:a89e9ff65d5f
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Dec 17 20:45:22 2013 +0000

description:
Free pathbuf in an error path.
>From Maxime Villard.

diffstat:

 sys/compat/common/compat_util.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r e5b9afed8c48 -r a89e9ff65d5f sys/compat/common/compat_util.c
--- a/sys/compat/common/compat_util.c   Tue Dec 17 20:26:46 2013 +0000
+++ b/sys/compat/common/compat_util.c   Tue Dec 17 20:45:22 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_util.c,v 1.44 2010/11/19 06:44:35 dholland Exp $        */
+/*     $NetBSD: compat_util.c,v 1.45 2013/12/17 20:45:22 martin Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_util.c,v 1.44 2010/11/19 06:44:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_util.c,v 1.45 2013/12/17 20:45:22 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -139,6 +139,7 @@
        error = namei(&nd);
        if (error != 0) {
                epp->ep_interp = NULL;
+               pathbuf_destroy(pb);
                return error;
        }
 



Home | Main Index | Thread Index | Old Index