Re: [libvirt PATCH] virnetdaemon: fix memory leak in virNetDaemonCallInhibit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
src/rpc/virnetdaemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux