]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nwfilter: Avoid possible double free in virNWFilterInstReset()
authorAlexander Kuznetsov <kuznetsovam@altlinux.org>
Mon, 14 Apr 2025 13:51:34 +0000 (16:51 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 15 Apr 2025 10:57:07 +0000 (12:57 +0200)
commit5de27c32a18f1da4969a679a2385d45cf0279699
tree79a19a0e8a4a59868f96528f3e36ccbf95a91f28
parent9ccd9676a8fe074e64eb9ba55a521e8ff2ecfe5a
nwfilter: Avoid possible double free in virNWFilterInstReset()

virNWFilterInstReset() may be called multiple times, leading to a double g_free()
Replace plain g_free() with g_clear_pointer() to prevent this

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Dmitry Fedin <d.fedin@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/nwfilter/nwfilter_gentech_driver.c