summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/call-stub.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-19 14:07:14 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-19 05:45:16 -0700
commitdef3dd7f37150657e1b41a2df8a563a93394a518 (patch)
treec3b6055c5e304cd7d89a888d291f2d16ddb904f2 /libglusterfs/src/call-stub.c
parent65c6e3706f5290947179922c9e3b8f05ea6ae91c (diff)
libglusterfs/call-stub: ref dict while storing it in readdirp stub
Change-Id: I11224f7afa2e87dc242cc2e9e865c7ab2bb88c7e BUG: 765785 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2974 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/call-stub.c')
-rw-r--r--libglusterfs/src/call-stub.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index cdae9df251e..9b3a9c34849 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -1868,7 +1868,9 @@ fop_readdirp_stub (call_frame_t *frame,
stub->args.readdirp.fd = fd_ref (fd);
stub->args.readdirp.size = size;
stub->args.readdirp.off = off;
- stub->args.readdirp.dict = dict;
+ if (dict != NULL) {
+ stub->args.readdirp.dict = dict_ref (dict);
+ }
out:
return stub;
@@ -3642,6 +3644,10 @@ call_stub_destroy_wind (call_stub_t *stub)
{
if (stub->args.readdirp.fd)
fd_unref (stub->args.readdirp.fd);
+
+ if (stub->args.readdirp.dict)
+ dict_unref (stub->args.readdirp.dict);
+
break;
}