From 834fa2fd36fed9b5ccd03079f780e6c5ae58f317 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 17 May 2012 13:56:02 +0530 Subject: protocol/client: check if the name is NULL before duping it Change-Id: I1cefc34af6fae2e71b05179824963e06361c35a2 BUG: 822385 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.com/3353 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Tested-by: Anand Avati --- xlators/protocol/client/src/client3_1-fops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/protocol') diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 1129aebc0..e17a650d3 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 (); -- cgit