diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-19 02:21:16 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-03-19 14:09:15 +0100 |
commit | af734bc7cf38df4b17896c2767b5d5e967c6dd8d (patch) | |
tree | e2c562de8e5bfca2ba269909d0df3262e38a876a /zebra/zebra_netns_id.c | |
parent | Merge pull request #1911 from donaldsharp/mpls_love (diff) | |
download | frr-af734bc7cf38df4b17896c2767b5d5e967c6dd8d.tar.xz frr-af734bc7cf38df4b17896c2767b5d5e967c6dd8d.zip |
zebra: Fix leaked fd.
When we detect an error condition, close down the opened
fd.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
Diffstat (limited to 'zebra/zebra_netns_id.c')
-rw-r--r-- | zebra/zebra_netns_id.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c index a81413f5a..d278ebe91 100644 --- a/zebra/zebra_netns_id.c +++ b/zebra/zebra_netns_id.c @@ -172,6 +172,7 @@ ns_id_t zebra_ns_id_get(const char *netnspath) if (sock < 0) { zlog_err("netlink( %u) socket() error: %s", sock, safe_strerror(errno)); + close(fd); return NS_UNKNOWN; } memset(&snl, 0, sizeof(snl)); |