]> git.proxmox.com Git - mirror_qemu.git/commit
char: free the tcp connection data when closing
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 14 Jul 2016 01:21:37 +0000 (03:21 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sun, 7 Aug 2016 20:00:11 +0000 (00:00 +0400)
commit5b498459b441f4639fd4c39c35345637bfc6c16c
treed7e809ac7a979834bafa5dea31bb253da7f8f94e
parent157e94e8a2f7d3e14060d833bd1519a83099eaa9
char: free the tcp connection data when closing

Make sure the connection data got freed when closing the chardev, to
avoid leaks. Introduce tcp_chr_free_connection() to clean all connection
related data, and move some tcp_chr_close() clean-ups there.

(while at it, set write_msgfds_num to 0 when clearing array in
tcp_set_msgfds())

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-char.c