]> Git Repo - qemu.git/commit
libvhost-user: Fix resource leak
authorYongji Xie <[email protected]>
Thu, 18 Jan 2018 15:41:56 +0000 (23:41 +0800)
committerMichael S. Tsirkin <[email protected]>
Tue, 13 Feb 2018 16:25:48 +0000 (18:25 +0200)
commitbb102d1da15a97c6750a4f96810cf15713be2bd6
tree0d1d9a8da94de650f6a05d7e106ed680c3904442
parentb86107ab43b804e899a226fe287e34ab8acef596
libvhost-user: Fix resource leak

Free the mmaped memory when we need to mmap new memory
space on vu_set_mem_table_exec() and vu_set_log_base_exec() to
avoid memory leak.

Also close the corresponding fd after mmap() on
vu_set_log_base_exec() to avoid fd leak.

Signed-off-by: Yongji Xie <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
contrib/libvhost-user/libvhost-user.c
This page took 0.025907 seconds and 4 git commands to generate.