]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_verify_existing_name() - Minor NFC normalization error handling fix
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 2 Feb 2026 08:42:49 +0000 (10:42 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 2 Feb 2026 17:22:30 +0000 (17:22 +0000)
Mainly this fixes dead code complaint from static analyzer, because
practically the error handling ended up being identical anyway.

Broken by d346ca98293747c804276ba7f86245def47a8308

src/lib-storage/mail-storage.c

index 5df5707d2b84657a95750c9760185524d226f055..2e67c1b8cabe81705a4f9c08bd4cfef82d718893 100644 (file)
@@ -1747,9 +1747,10 @@ static int mailbox_verify_existing_name_int(struct mailbox *box)
                if (ret == 0) {
                        i_assert(box->storage->error == MAIL_ERROR_NOTFOUND);
                        ret = -1;
+               } else {
+                       ret = mailbox_get_path_to(box,
+                               MAILBOX_LIST_PATH_TYPE_MAILBOX, &path);
                }
-               ret = mailbox_get_path_to(box, MAILBOX_LIST_PATH_TYPE_MAILBOX,
-                                         &path);
        }
 
        if (ret < 0) {