dovecot-2.0: quota: Don't crash with non-Maildir++ quota backend.

dovecot at dovecot.org dovecot at dovecot.org
Mon Sep 28 21:24:43 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/739d8d99bafe
changeset: 9940:739d8d99bafe
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 28 14:24:14 2009 -0400
description:
quota: Don't crash with non-Maildir++ quota backend.
Patch by Brandon Davidson.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/plugins/quota/quota.c |    6 ++++--

diffs (16 lines):

diff -r 9b4bb1a7d789 -r 739d8d99bafe src/plugins/quota/quota.c
--- a/src/plugins/quota/quota.c	Mon Sep 28 11:11:54 2009 -0400
+++ b/src/plugins/quota/quota.c	Mon Sep 28 14:24:14 2009 -0400
@@ -507,8 +507,10 @@ static int quota_root_get_rule_limits(st
 	bool found;
 
 	if (!root->set->force_default_rule) {
-		if (root->backend.v.init_limits(root) < 0)
-			return -1;
+		if (root->backend.v.init_limits != NULL) {
+			if (root->backend.v.init_limits(root) < 0)
+				return -1;
+		}
 	}
 
 	bytes_limit = root->bytes_limit;


More information about the dovecot-cvs mailing list