]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota: Fix error handling on settings lookup failure
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 16 Jan 2025 11:35:06 +0000 (13:35 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:02 +0000 (10:40 +0200)
src/plugins/quota/quota-count.c

index ddee277b3e4be7dba619c93e44554cd69ea94fff..f91b9ca998651d576d09f7a3383abc4c522a5a12 100644 (file)
@@ -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, &quota_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 */