summaryrefslogtreecommitdiffstats
path: root/xlators/lib
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-03-26 21:08:12 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-27 00:21:33 -0700
commitd15dedd8c99e84018a50130a8ffe5e971b9f7bd4 (patch)
treefd4cbfede70d25d019509ec42b5864a708429965 /xlators/lib
parentc8a723ac7cbd7bdc8bd01350c56e15fd7fa5e7ca (diff)
xlators/lib: Handle NULL 'name' for marker xattrs
Change-Id: I18f00b7e92f483673250821c457d1e8be2eef081 BUG: 1200372 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10015 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/lib')
-rw-r--r--xlators/lib/src/libxlator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/lib/src/libxlator.c b/xlators/lib/src/libxlator.c
index 30436131b6b..0f703904fab 100644
--- a/xlators/lib/src/libxlator.c
+++ b/xlators/lib/src/libxlator.c
@@ -458,6 +458,9 @@ cluster_handle_marker_getxattr (call_frame_t *frame, loc_t *loc,
if (GF_CLIENT_PID_GSYNCD != frame->root->pid)
return -EINVAL;
+ if (name == NULL)
+ return -EINVAL;
+
if (strcmp (GF_XATTR_MARKER_KEY, name) == 0) {
type = MARKER_UUID_TYPE;
memcpy (gauge, marker_uuid_default_gauge, sizeof (gauge));