tap: fix memory leak on failure in net_init_tap()
Commit 091a6b2a 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 <peter.maydell@linaro.org> Signed-off-by:
Jason Wang <jasowang@redhat.com>
Loading
Please register or sign in to comment