Source-Changes-HG archive

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

[src/trunk]: src/sys/kern uipc_usrreq: plug mbuf leak.



details:   https://anonhg.NetBSD.org/src/rev/e39dc3f7e7fe
branches:  trunk
changeset: 582091:e39dc3f7e7fe
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu Jun 16 14:36:42 2005 +0000

description:
uipc_usrreq: plug mbuf leak.

diffstat:

 sys/kern/uipc_usrreq.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 47cd1609601a -r e39dc3f7e7fe sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c    Thu Jun 16 14:32:09 2005 +0000
+++ b/sys/kern/uipc_usrreq.c    Thu Jun 16 14:36:42 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_usrreq.c,v 1.82 2005/05/29 22:24:15 christos Exp $        */
+/*     $NetBSD: uipc_usrreq.c,v 1.83 2005/06/16 14:36:42 yamt Exp $    */
 
 /*-
  * Copyright (c) 1998, 2000, 2004 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.82 2005/05/29 22:24:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.83 2005/06/16 14:36:42 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -304,8 +304,9 @@
                 * has the side-effect of preventing a caller from
                 * forging SCM_CREDS.
                 */
-               if (control && (error = unp_internalize(control, p)))
-                       break;
+               if (control && (error = unp_internalize(control, p))) {
+                       goto die;
+               }
                switch (so->so_type) {
 
                case SOCK_DGRAM: {



Home | Main Index | Thread Index | Old Index