From d03322b2a5c36ecc3af9ec017a4f0b4675fa87c1 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 21 Jan 2016 16:31:29 +0100 Subject: [PATCH] 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 --- src/platform/nm-linux-platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index f5166803c8..2ea9360940 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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; }