[libvirt] [libvirt-glib] a leak in libvirt-glib
marcandre.lureau at gmail.com
Mon Feb 27 16:25:58 UTC 2012
In libvirt-glib, we call virStreamEventAddCallback() and give it a
ref, that is supposed to be unref when the stream event is removed. But
this doesn't happen! I tracked it down to:
static void remoteStreamCallbackFree(void *opaque)
struct remoteStreamCallbackData *cbdata = opaque;
if (!cbdata->cb && cbdata->ff)
Why are we checking for cbdata->cb here? That gives us a leak
when taking screenshots. So far I solved it
with the attached patch for libvirt-glib. I noticed it because that
of a resulting process & fd leakage in the libvirtd side.
It might be that the fix should be in libvirt, but anyway, the proposed
patch doesn't need a libvirt depedency update and also keeps the
object reference manangement at the libvirt-glib level, which is nice.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3452 bytes
Desc: not available
More information about the libvir-list