dovecot-2.0: quota: Don't crash if user has quota disabled.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 28 18:05:46 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/e5f0231b7a40
changeset: 12191:e5f0231b7a40
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 28 16:05:40 2010 +0100
description:
quota: Don't crash if user has quota disabled.
diffstat:
src/plugins/quota/quota-storage.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (23 lines):
diff -r d75a01131ddc -r e5f0231b7a40 src/plugins/quota/quota-storage.c
--- a/src/plugins/quota/quota-storage.c Mon Sep 27 19:53:07 2010 +0100
+++ b/src/plugins/quota/quota-storage.c Tue Sep 28 16:05:40 2010 +0100
@@ -505,6 +505,9 @@
struct quota_root *root;
bool add;
+ if (QUOTA_USER_CONTEXT(list->ns->user) == NULL)
+ return;
+
/* see if we have a quota explicitly defined for this namespace */
quota = quota_get_mail_user_quota(list->ns->user);
root = quota_find_root_for_ns(quota, list->ns);
@@ -566,6 +569,9 @@
struct quota_root *const *roots;
unsigned int i, count;
+ if (QUOTA_USER_CONTEXT(namespaces->user) == NULL)
+ return;
+
quota = quota_get_mail_user_quota(namespaces->user);
roots = array_get("a->roots, &count);
for (i = 0; i < count; i++)
More information about the dovecot-cvs
mailing list