io: fix QIONetListener memory leak
PATCH 1/1 io: fix QIONetListener memory leak
The sources array does not escape out of qio_net_listener_wait_client, so we have to free it.
Reported by Coverity.
Cc Daniel P. Berrange <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- io/net-listener.c | 1 + 1 file changed, 1 insertion(+)
io/net-listener.c +1 -0
@@ -234,6 +234,7 @@ QIOChannelSocket *qio_net_listener_wait_client(QIONetListener *listener)for (i =0 ; i < listener->nsioc; i++) {g_source_unref (sources[i]); } +g_free (sources);g_main_loop_unref (loop);g_main_context_unref (ctxt);
Signature · 1 line
2.14.3
Quoted 10 lines · Paolo Bonzini
The sources array does not escape out of
qio_net_listener_wait_client, so we have to free it.Reported by Coverity.
Cc Daniel P. Berrange <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- io/net-listener.c | 1 + 1 file changed, 1 insertion(+)
Thanks, queued.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|