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

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



On Wed, Sep 23, 2020 at 16:37:48 +0200, 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 redhat com>
> Signed-off-by: Pavel Hrdina <phrdina redhat com>
> ---

Reviewed-by: Peter Krempa <pkrempa redhat com>


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