summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-helpers.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-02-23 22:58:44 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-27 02:17:34 -0800
commit85471322df9676cc344cc2b03627c02ed90da3cd (patch)
tree7784d17a0913e314658fd25a496c0508a093fabe /xlators/protocol/server/src/server-helpers.c
parentbd94f6a1cc26fbcf8811e04dab0c90257b44d89a (diff)
glusterfsd: unref the dict and free the memory to avoid memleak
Change-Id: Ib7a1f8cbab039fefb73dc35560a035d5688b0e32 BUG: 796186 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2808 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
-rw-r--r--xlators/protocol/server/src/server-helpers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index 11824b27f60..cfa5ea46e0e 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -1456,6 +1456,8 @@ readdirp_rsp_cleanup (gfs3_readdirp_rsp *rsp)
prev = trav;
while (trav) {
trav = trav->nextentry;
+ if (prev->dict.dict_val)
+ GF_FREE (prev->dict.dict_val);
GF_FREE (prev);
prev = trav;
}