]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: fix incorrect free of GVariant in our GLib mock functions
authorPavel Hrdina <phrdina@redhat.com>
Fri, 2 Oct 2020 10:11:45 +0000 (12:11 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 2 Oct 2020 10:43:15 +0000 (12:43 +0200)
commit48622bb5637587a1cc24f7fdc8ab32cd89798a9d
treed549e566e41914a8de8c90e67f622a01b6c91055
parent44b0895ce5968a8b23f51b6dc9885ea50681e23f
tests: fix incorrect free of GVariant in our GLib mock functions

GLib implementation of g_dbus_connection_call_sync() calls
g_variant_ref_sink() on the passed @parameters to make sure they have
proper reference. If the original reference is floating the
g_dbus_connection_call_sync() consumes it, but if it's normal reference
it will just add another one.

Our mock functions were only freeing the @parameters which is incorrect
and doesn't reflect how the real implementation works.

Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/networkxml2firewalltest.c
tests/virfirewalltest.c
tests/virpolkittest.c
tests/virsystemdtest.c