tap: fix memory leak on success to create a tap device
commit323e7c117754e4d4ce6b4282d74ad01c99d67714
authorYunjian Wang <wangyunjian@huawei.com>
Thu, 31 May 2018 07:28:22 +0000 (31 15:28 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 20 Jul 2018 00:30:49 +0000 (20 08:30 +0800)
tree45932a4cf545d6e8a6122aadab67e140f9ca58c7
parent4712c158c5276fd3c401152f4bb5c3fccf185946
tap: fix memory leak on success to create a tap device

The memory leak on success to create a tap device. And the nfds and
nvhosts may not be the same and need to be processed separately.

Fixes: 07825977 ("tap: fix memory leak on failure to create a multiqueue tap device")
Fixes: 264986e2 ("tap: multiqueue support")
Cc: qemu-stable@nongnu.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/tap.c