]> git.proxmox.com Git - mirror_qemu.git/commit
tests/vhost-user-bridge.c: fix fd leakage
authorVictor Kaplansky <victork@redhat.com>
Tue, 1 Dec 2015 16:57:39 +0000 (18:57 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 2 Dec 2015 17:27:26 +0000 (19:27 +0200)
commit6d0b908a628a7086fa855c68b217cc1e2a5c4c19
tree2006fdf4e7d06231d83d8f5afd91b9e7c3edf20d
parentb0ae1536c5248bc5f0f4472b8020a7a9d2ef9293
tests/vhost-user-bridge.c: fix fd leakage

This fixes file descriptor leakage in vhost-user-bridge
application. Whenever a new callfd or kickfd is set, the previous
one should be explicitly closed. File descriptors used to map
guest's memory are closed immediately after mmap call.

Signed-off-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tests/vhost-user-bridge.c