Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Call m_freem(m) only if m0 == NULL.
details: https://anonhg.NetBSD.org/src/rev/04e5b411f70a
branches: trunk
changeset: 366170:04e5b411f70a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue May 17 00:02:57 2022 +0000
description:
Call m_freem(m) only if m0 == NULL.
diffstat:
sys/dev/pci/if_wm.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 7aa3dccd4791 -r 04e5b411f70a sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Mon May 16 22:03:16 2022 +0000
+++ b/sys/dev/pci/if_wm.c Tue May 17 00:02:57 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.730 2022/05/03 00:23:33 gutteridge Exp $ */
+/* $NetBSD: if_wm.c,v 1.731 2022/05/17 00:02:57 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.730 2022/05/03 00:23:33 gutteridge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.731 2022/05/17 00:02:57 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -8016,9 +8016,10 @@
* increment successed packet counter as in the case
* which the packet is discarded by link down PHY.
*/
- if (m0 != NULL)
+ if (m0 != NULL) {
if_statinc(ifp, if_opackets);
- m_freem(m0);
+ m_freem(m0);
+ }
} while (m0 != NULL);
return;
}
@@ -8633,9 +8634,10 @@
* increment successed packet counter as in the case
* which the packet is discarded by link down PHY.
*/
- if (m0 != NULL)
+ if (m0 != NULL) {
if_statinc(ifp, if_opackets);
- m_freem(m0);
+ m_freem(m0);
+ }
} while (m0 != NULL);
return;
}
Home |
Main Index |
Thread Index |
Old Index