diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-18 09:53:08 +0100 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2018-02-15 16:54:57 +0000 |
commit | 28bb0a59f84c11c42117a7009646508256ed4475 (patch) | |
tree | d29fde18717d2b7ff29347c54b1394b7edd29236 /io | |
parent | 8c5e7bddc22dac9d4dc3526996babce4c7242d9d (diff) |
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>
Diffstat (limited to 'io')
-rw-r--r-- | io/net-listener.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io/net-listener.c b/io/net-listener.c index 77a4e2831c..de38dfae99 100644 --- a/io/net-listener.c +++ b/io/net-listener.c @@ -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); |