From e964dd74fa805124005a5b2cb031ecbc34198b9a Mon Sep 17 00:00:00 2001 From: Manikandan Selvaganesh Date: Mon, 18 Apr 2016 15:27:01 +0530 Subject: quota : fix null dereference issues in quota Change-Id: I3805b206077718da26adbeb8b29a53642e00886f BUG: 1328696 Signed-off-by: Manikandan Selvaganesh Reviewed-on: http://review.gluster.org/14022 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/features/quota/src/quota.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators') 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) -- cgit