]> git.ipfire.org Git - thirdparty/libvirt.git/commit
esx: switch VIR_FREE->g_free in esx*Free*()
authorLaine Stump <laine@redhat.com>
Fri, 12 Feb 2021 19:13:03 +0000 (14:13 -0500)
committerLaine Stump <laine@redhat.com>
Tue, 16 Feb 2021 18:50:04 +0000 (13:50 -0500)
commit443c79dd7f7d4051fc0084baaa6c56a55d2aace4
treea049bb967a84480dc837d416f0e82521cbf3ce21
parentd79a6e2c8c012a910ce52c2202722dff601e2ff8
esx: switch VIR_FREE->g_free in esx*Free*()

Although the three functions esxFreePrivate(), esxFreeStreamPrivate(),
and esxUtil_FreeParsedUri() are calling VIR_FREE on *object, and so in
theory the caller of the function might rely on "object" (the free
function's arg) being set to NULL, in practice these functions are
only called from a couple places each, and in all cases the pointer
that is passed is a local variable, and goes out of scope almost
immediately after calling the Free function, so it is safe to change
VIR_FREE() into g_free().

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/esx/esx_driver.c
src/esx/esx_stream.c
src/esx/esx_util.c