From 687e510e5ce32fddf46a9dc1d517ccc8a8e25581 Mon Sep 17 00:00:00 2001 From: Lutz Donnerhacke Date: Sat, 15 May 2021 11:32:57 +0200 Subject: [PATCH] netgraph/ng_checksum: Fix double free error m_pullup(9) frees the mbuf(9) chain in the case of an allocation error. The mbuf chain must not be freed again in this case. PR: 255874 Submitted by: Approved by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30273 --- sys/netgraph/ng_checksum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/ng_checksum.c b/sys/netgraph/ng_checksum.c index 682375c805d..3b542bd86ac 100644 --- a/sys/netgraph/ng_checksum.c +++ b/sys/netgraph/ng_checksum.c @@ -682,9 +682,9 @@ ng_checksum_rcvdata(hook_p hook, item_p item) return (error); done: + NG_FREE_M(m); drop: NG_FREE_ITEM(item); - NG_FREE_M(m); priv->stats.dropped++; -- 2.45.0