Skip to content
Snippets Groups Projects
Commit fac7d7b1 authored by Peter Maydell's avatar Peter Maydell Committed by Jason Wang
Browse files

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: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
parent a023b7ac
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment