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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user