[libvirt PATCH] virnetdaemon: fix memory leak in virNetDaemonCallInhibit

Ján Tomko jtomko at redhat.com
Wed Sep 23 14:40:09 UTC 2020

On a Wednesday in 2020, Pavel Hrdina wrote:
>g_variant_new() returns a weak reference which can be consumed by passing
>to other g_variant* functions or to g_dbus_connection_call* functions.
>This make it possible to call g_variant_new() directly as argument to
>the functions above. Because this might be confusing I explicitly call
>g_variant_ref_sink() to make it normal reference in both
>virGDBusCallMethod() and virGDBusCallMethodWithFD() so the caller is
>always responsible for the data.
>Reported-by: Peter Krempa <pkrempa at redhat.com>
>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> src/rpc/virnetdaemon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Ján Tomko <jtomko at redhat.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200923/bfb0263e/attachment-0001.sig>

More information about the libvir-list mailing list