Module Name:    src
Committed By:   christos
Date:           Thu Dec 15 22:20:26 UTC 2011

Modified Files:
        src/sys/net: bpf.c

Log Message:
don't leak mbufs.


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/sys/net/bpf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/bpf.c
diff -u src/sys/net/bpf.c:1.166 src/sys/net/bpf.c:1.167
--- src/sys/net/bpf.c:1.166	Tue Aug 30 10:22:22 2011
+++ src/sys/net/bpf.c	Thu Dec 15 17:20:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.166 2011/08/30 14:22:22 bouyer Exp $	*/
+/*	$NetBSD: bpf.c,v 1.167 2011/12/15 22:20:26 christos Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.166 2011/08/30 14:22:22 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.167 2011/12/15 22:20:26 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -681,8 +681,8 @@ bpf_write(struct file *fp, off_t *offp, 
 	if (mc != NULL) {
 		if (error == 0)
 			(*ifp->if_input)(ifp, mc);
-	} else
 		m_freem(mc);
+	}
 	splx(s);
 	KERNEL_UNLOCK_ONE(NULL);
 	/*

Reply via email to