linux-platform: fix a file descriptor leak

Coverity: CID 59384 (#3-1 of 3): Resource leak (RESOURCE_LEAK)26.
leaked_handle: Handle variable fd going out of scope leaks the handle
This commit is contained in:
Lubomir Rintel
2016-01-21 16:31:29 +01:00
parent de19bc20d0
commit d03322b2a5

View File

@@ -4827,6 +4827,7 @@ tun_add (NMPlatform *platform, const char *name, gboolean tap,
if (out_link)
*out_link = obj ? &obj->link : NULL;
close (fd);
return !!obj;
}