Re: [Qemu-devel] [PATCH] tap: fix memory leak on failure in net_init_tap()

2017-01-10 Thread Jason Wang
On 2017年01月11日 03:21, Peter Maydell wrote: Commit 091a6b2ac fixed most of the memory leaks in failure paths in net_init_tap() reported by Coverity (CID 1356216), but missed one. Fix it by deferring the allocation of fds and vhost_fds until after the error check. Signed-off-by: Peter Maydell -

[Qemu-devel] [PATCH] tap: fix memory leak on failure in net_init_tap()

2017-01-10 Thread Peter Maydell
Commit 091a6b2ac fixed most of the memory leaks in failure paths in net_init_tap() reported by Coverity (CID 1356216), but missed one. Fix it by deferring the allocation of fds and vhost_fds until after the error check. Signed-off-by: Peter Maydell --- net/tap.c | 7 +-- 1 file changed, 5 in