summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client3_1-fops.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-05-17 13:56:02 +0530
committerAnand Avati <avati@redhat.com>2012-05-17 09:07:54 -0700
commit834fa2fd36fed9b5ccd03079f780e6c5ae58f317 (patch)
tree924b3b228643bc736bf67efa888c0165c3241331 /xlators/protocol/client/src/client3_1-fops.c
parent07c9a96627932ad3fc8c99193f8cfdae522ca9c1 (diff)
protocol/client: check if the name is NULL before duping it
Change-Id: I1cefc34af6fae2e71b05179824963e06361c35a2 BUG: 822385 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3353 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client3_1-fops.c')
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 1129aebc04d..e17a650d3c4 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -4638,7 +4638,9 @@ client3_1_getxattr (call_frame_t *frame, xlator_t *this,
}
loc_copy (&local->loc, args->loc);
- local->name = gf_strdup (args->name);
+ if (args->name)
+ local->name = gf_strdup (args->name);
+
frame->local = local;
rsp_iobref = iobref_new ();