Commit 237260f4 authored by Andrei Vagin's avatar Andrei Vagin

tun: don't leak a file descriptor

CID 84654 (#1 of 1): Resource leak (RESOURCE_LEAK)
6. leaked_handle: Handle variable fd going out of scope leaks the handle.
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 7ed045c4
......@@ -371,7 +371,7 @@ static int tunfile_open(struct file_desc *d, int *new_fd)
ns_id = ti->tfe->ns_id;
if (set_netns(ns_id))
return -1;
goto err;
if (!ti->tfe->netdev)
/* just-opened tun file */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment