[libvirt PATCH] tests: fix incorrect free of GVariant in our GLib mock functions
Michal Prívozník
mprivozn at redhat.com
Fri Oct 2 10:42:00 UTC 2020
On 10/2/20 12:36 PM, Pavel Hrdina wrote:
> 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 at redhat.com>
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> tests/networkxml2firewalltest.c | 4 +++-
> tests/virfirewalltest.c | 3 +++
> tests/virpolkittest.c | 3 +++
> tests/virsystemdtest.c | 4 +++-
> 4 files changed, 12 insertions(+), 2 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn at redhat.com>
Michal
More information about the libvir-list
mailing list