summaryrefslogtreecommitdiffstats
path: root/hw/i386/pc_q35.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-06-22 10:38:37 +0800
committerMichael S. Tsirkin <mst@redhat.com>2014-06-23 17:38:00 +0300
commitd2fc39b4208709db95b6825c0e1b00ce6fbf0ecc (patch)
treeec00af1ce4c8ef8f159249a2ecedd19d945aee5d /hw/i386/pc_q35.c
parent4f8586144161d5e680fdef3e09b7e8e9111c2929 (diff)
downloadhqemu-d2fc39b4208709db95b6825c0e1b00ce6fbf0ecc.zip
hqemu-d2fc39b4208709db95b6825c0e1b00ce6fbf0ecc.tar.gz
qemu-char: avoid leaking unused fds in tcp_get_msgfds()
Commit c76bf6bb8fbbb233a7d3641e09229d23747d5ee3 ("Add chardev API qemu_chr_fe_get_msgfds") extended the get_msgfds API from one to multiple file descriptors. It forgot to close unused file descriptors before freeing the file descriptor array. This patch prevents a file descriptor leak if the tcp_get_msgfds() callers requests fewer file descriptors than are available. Cc: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc_q35.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud