Module Name: src Committed By: christos Date: Wed Dec 16 23:14:42 UTC 2015
Modified Files: src/sys/net: bpf.c Log Message: don't free mbuf twice. XXX: pullup 7. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 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.192 src/sys/net/bpf.c:1.193 --- src/sys/net/bpf.c:1.192 Wed Oct 14 15:40:09 2015 +++ src/sys/net/bpf.c Wed Dec 16 18:14:42 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.192 2015/10/14 19:40:09 christos Exp $ */ +/* $NetBSD: bpf.c,v 1.193 2015/12/16 23:14:42 christos Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.192 2015/10/14 19:40:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.193 2015/12/16 23:14:42 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_bpf.h" @@ -721,7 +721,8 @@ bpf_write(struct file *fp, off_t *offp, if (mc != NULL) { if (error == 0) (*ifp->if_input)(ifp, mc); - m_freem(mc); + else + m_freem(mc); } splx(s); KERNEL_UNLOCK_ONE(NULL);