Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/tap: fix fd leak on creation failure
[ upstream commit cbf8909 ] When eth_dev_tap_create() is failed, nlsk_fd and ka_fd won't be closed thus leading fds leak. Zero is a valid fd. Ultimately leads to a valid fd was closed by mistake. Fixes: bf7b7f4 ("net/tap: create netdevice during probing") Fixes: cb7e68d ("net/tap: fix cleanup on allocation failure") Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
- Loading branch information