Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2022 11:14:04 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 48767d8734ea - main - pfsync: fix memory leak
Message-ID:  <202211151114.2AFBE4LF073645@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=48767d8734ea21182eec04273127818e3878c2e5

commit 48767d8734ea21182eec04273127818e3878c2e5
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-11-15 11:11:32 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-11-15 11:13:11 +0000

    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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202211151114.2AFBE4LF073645>