mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 11:19:16 +02:00
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:
parent
de19bc20d0
commit
d03322b2a5
1 changed files with 1 additions and 0 deletions
|
|
@ -4827,6 +4827,7 @@ tun_add (NMPlatform *platform, const char *name, gboolean tap,
|
||||||
if (out_link)
|
if (out_link)
|
||||||
*out_link = obj ? &obj->link : NULL;
|
*out_link = obj ? &obj->link : NULL;
|
||||||
|
|
||||||
|
close (fd);
|
||||||
return !!obj;
|
return !!obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue