From 187743e00112010ee48543882a96c5fbbdba961c 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 Backport of http://review.gluster.org/#/c/14022/ > 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 Change-Id: Ia5af10b79a71c6be5db293aee070049364b70237 BUG: 1329115 Signed-off-by: Manikandan Selvaganesh Reviewed-on: http://review.gluster.org/14041 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Vijaikumar Mallikarjuna --- xlators/features/quota/src/quota.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/features/quota') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 41ad2f04d5c..1d32e1b06fe 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