[Bug 276526] if_wg: Add missing bpfdetach() in wg_clone_destroy()

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 22 Jan 2024 16:23:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276526

--- Comment #2 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=43be2d7aaf25b719aec8f49aab110c0061f1edec

commit 43be2d7aaf25b719aec8f49aab110c0061f1edec
Author:     Aaron LI <aly@aaronly.me>
AuthorDate: 2024-01-22 16:18:56 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2024-01-22 16:22:44 +0000

    wg: detach bpf upon destroy as well

    bpfattach() is called in wg_clone_create(), but the bpfdetach() is
    missing from wg_close_destroy().  Add the missing bpfdetach() to avoid
    leaking both the associated bpf bits as well as the ifnet that bpf will
    hold a reference to.

    PR:             276526
    MFC after:      3 days

 sys/dev/wg/if_wg.c | 1 +
 1 file changed, 1 insertion(+)

-- 
You are receiving this mail because:
You are on the CC list for the bug.