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>
This commit is contained in:
parent
8c5e7bddc2
commit
28bb0a59f8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user