uipc_usrreq: plug mbuf leak.

This commit is contained in:
yamt 2005-06-16 14:36:42 +00:00
parent 8e9e66997f
commit 91fa31b5d2
1 changed files with 5 additions and 4 deletions

View File

@ -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 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
* 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: {