summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 401f8ca8578..80f5fb8514c 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -390,6 +390,9 @@ _posix_get_marker_quota_contributions(posix_xattr_filler_t *filler, char *key)
int i = 0, ret = 0;
tmp_key = ptr = gf_strdup(key);
+ if (tmp_key == NULL) {
+ return -1;
+ }
for (i = 0; i < 4; i++) {
token = strtok_r(tmp_key, ".", &saveptr);
tmp_key = NULL;