summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2016-04-18 15:27:01 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-04-20 10:39:20 -0700
commite964dd74fa805124005a5b2cb031ecbc34198b9a (patch)
tree9dc6cf630fd9ac9b3bbd5002cb8aab116e406c11 /xlators
parentb6a0780d86e7c6afe7ae0d9a87e6fe5c62b4d792 (diff)
quota : fix null dereference issues in quota
Change-Id: I3805b206077718da26adbeb8b29a53642e00886f BUG: 1328696 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14022 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/quota/src/quota.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 622227912da..47436fd5783 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -692,7 +692,8 @@ quota_add_parent (struct list_head *list, char *name, uuid_t pgfid)
}
entry = __quota_dentry_new (NULL, name, pgfid);
- list_add_tail (&entry->next, list);
+ if (entry)
+ list_add_tail (&entry->next, list);
out:
if (found)