diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-10-23 01:14:21 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-10-24 23:30:30 +0200 |
commit | 44f12f209f7019c0abbec0f919cb18a136cd7bee (patch) | |
tree | 68eb68f5f5655eb8de51b4ebbde386500bd0b51b /lib/hash.c | |
parent | ospfd: fix coverity warnings - security best practices violations (diff) | |
download | frr-44f12f209f7019c0abbec0f919cb18a136cd7bee.tar.xz frr-44f12f209f7019c0abbec0f919cb18a136cd7bee.zip |
*: 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 'lib/hash.c')
-rw-r--r-- | lib/hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/hash.c b/lib/hash.c index f22227921..4894b65af 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -395,6 +395,7 @@ DEFUN_NOSH(show_hash_stats, pthread_mutex_lock(&_hashes_mtx); if (!_hashes) { pthread_mutex_unlock(&_hashes_mtx); + ttable_del(tt); vty_out(vty, "No hash tables in use.\n"); return CMD_SUCCESS; } |