From: Timo Sirainen Date: Thu, 16 Jan 2025 11:35:06 +0000 (+0200) Subject: quota: Fix error handling on settings lookup failure X-Git-Tag: 2.4.0~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5e28580d8f1ce08dff4a44b96d569fbf17d7dce;p=thirdparty%2Fdovecot%2Fcore.git quota: Fix error handling on settings lookup failure --- diff --git a/src/plugins/quota/quota-count.c b/src/plugins/quota/quota-count.c index ddee277b3e..f91b9ca998 100644 --- a/src/plugins/quota/quota-count.c +++ b/src/plugins/quota/quota-count.c @@ -42,9 +42,10 @@ quota_count_mailbox(struct quota_root *root, struct mail_namespace *ns, struct event *event = event_create(box->event); event_add_str(event, "quota", root->set->quota_name); if (settings_get(event, "a_root_setting_parser_info, 0, - &set, error_r) < 0) + &set, error_r) < 0) { + *error_result_r = QUOTA_GET_RESULT_INTERNAL_ERROR; ret = -1; - else if (set->quota_ignore) + } else if (set->quota_ignore) ret = 0; else if ((box->storage->class_flags & MAIL_STORAGE_CLASS_FLAG_NOQUOTA) != 0) { /* quota doesn't exist for this mailbox/storage */