summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/dict.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-06-05 14:15:54 +0530
committerAnand Avati <avati@redhat.com>2012-06-05 10:45:10 -0700
commit6eee473eba94697953e8b3e1b04fe5ef1de5f474 (patch)
treed435b4f4186690907c39a28257f3707ea86bbeb1 /libglusterfs/src/dict.c
parent04fd2972fe8a9b9568ac781ba7677f13fdce0f57 (diff)
downloadglusterfs-6eee473eba94697953e8b3e1b04fe5ef1de5f474.tar.gz
glusterfs-6eee473eba94697953e8b3e1b04fe5ef1de5f474.tar.xz
glusterfs-6eee473eba94697953e8b3e1b04fe5ef1de5f474.zip
core: coverity fixes (mostly resource leak fixes)
currently working on obvious resource leak reports in coverity Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/dict.c')
-rw-r--r--libglusterfs/src/dict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
index 8048414705..5ae61fd3d3 100644
--- a/libglusterfs/src/dict.c
+++ b/libglusterfs/src/dict.c
@@ -265,6 +265,8 @@ _dict_set (dict_t *this,
if (this->free_pair_in_use) {
pair = mem_get0 (THIS->ctx->dict_pair_pool);
if (!pair) {
+ if (key_free)
+ GF_FREE (key);
return -1;
}
}