Source-Changes-HG archive

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

[src/netbsd-7-0]: src/sys/kern Pull up following revision(s) (requested by ma...



details:   https://anonhg.NetBSD.org/src/rev/fa0469f8950d
branches:  netbsd-7-0
changeset: 801230:fa0469f8950d
user:      snj <snj%NetBSD.org@localhost>
date:      Tue Nov 01 20:09:11 2016 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #1268):
        sys/kern/uipc_usrreq.c: revision 1.181
Memory leak, found by Mootja. It is easily triggerable from userland.

diffstat:

 sys/kern/uipc_usrreq.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r e26fb1ab8fb7 -r fa0469f8950d sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c    Tue Nov 01 19:51:24 2016 +0000
+++ b/sys/kern/uipc_usrreq.c    Tue Nov 01 20:09:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_usrreq.c,v 1.169.2.3 2015/04/14 04:44:41 snj Exp $        */
+/*     $NetBSD: uipc_usrreq.c,v 1.169.2.3.2.1 2016/11/01 20:09:11 snj Exp $    */
 
 /*-
  * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.169.2.3 2015/04/14 04:44:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.169.2.3.2.1 2016/11/01 20:09:11 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1173,11 +1173,11 @@
                goto bad2;
        }
        vp = nd.ni_vp;
+       pathbuf_destroy(pb);
        if (vp->v_type != VSOCK) {
                error = ENOTSOCK;
                goto bad;
        }
-       pathbuf_destroy(pb);
        if ((error = VOP_ACCESS(vp, VWRITE, l->l_cred)) != 0)
                goto bad;
        /* Acquire v_interlock to protect against unp_detach(). */



Home | Main Index | Thread Index | Old Index