From 48767d8734ea21182eec04273127818e3878c2e5 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Tue, 15 Nov 2022 12:11:32 +0100 Subject: [PATCH] pfsync: fix memory leak The recent refactoring to prepare for pfsync over IPv6 introduced a memory leak. If we don't have a sync peer configured we return early (without sending out a packet), but failed to free the newly allocated packet. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/if_pfsync.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index f8cca8a4460b..a2baf477873e 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -1589,6 +1589,7 @@ pfsync_sendout(int schedswi, int c) } #endif default: + m_freem(m); return; }