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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
diff --git a/io/net-listener.c b/io/net-listener.c
index 77a4e28..de38dfa 100644
--- a/io/net-listener.c
+++ b/io/net-listener.c
@@ -234,6 +234,7 @@
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);