summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2016-04-18 15:27:01 +0530
committerVijaikumar Mallikarjuna <vmallika@redhat.com>2016-04-25 23:32:37 -0700
commit187743e00112010ee48543882a96c5fbbdba961c (patch)
tree7a5cd0c8a6b021abeb352161a9cf49b74e6686e6 /xlators/features
parent32b03257c16aa44dd98377a84208c8a5fdb9b2ef (diff)
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 <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> Change-Id: Ia5af10b79a71c6be5db293aee070049364b70237 BUG: 1329115 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/14041 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: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Diffstat (limited to 'xlators/features')
-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 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)