summaryrefslogtreecommitdiff
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-10-22 21:14:21 -0200
committerRenato Westphal <renato@opensourcerouting.org>2017-10-24 19:30:30 -0200
commit44f12f209f7019c0abbec0f919cb18a136cd7bee (patch)
tree68eb68f5f5655eb8de51b4ebbde386500bd0b51b /zebra/rtadv.c
parenta1d6bbb1f30d638a039db2b5e5ef3ea542590b62 (diff)
*: fix coverity warnings - resource leaks
These are mostly trivial fixes for leaks in the error path of some functions. The changes in bgpd/bgp_mpath.c deserves a bit of explanation though. In the bgp_info_mpath_aggregate_update() function, we were allocating memory for the lcomm variable but doing nothing with it. Since the code for communities, extended communities and large communities is pretty much the same in this function, it's clear that this was a copy and paste error where most of the ext. community code was copied but not all of it as it should have been. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 7f9bc47315..a1e1602bf8 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -675,6 +675,7 @@ static int rtadv_make_socket(void)
sizeof(struct icmp6_filter));
if (ret < 0) {
zlog_info("ICMP6_FILTER set fail: %s", safe_strerror(errno));
+ close(sock);
return ret;
}