]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Don't crash when opening inbox fails in mailbox-list-index-notify
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Thu, 21 Sep 2017 18:49:09 +0000 (21:49 +0300)
committerMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Thu, 21 Sep 2017 23:00:45 +0000 (02:00 +0300)
src/lib-storage/list/mailbox-list-index-notify.c

index 2e3ab60fb8f6e101155976a6312477f89e4a8780..c69ef1e32b00883fd63d17550bad7f167130ead3 100644 (file)
@@ -113,8 +113,10 @@ mailbox_list_index_notify_init_inbox(struct mailbox_list_notify_index *inotify)
                                       MAILBOX_FLAG_READONLY);
        if (mailbox_open(inotify->inbox) < 0)
                mailbox_free(&inotify->inbox);
-       inotify->inbox_log_path =
-               i_strconcat(inotify->inbox->index->filepath, ".log", NULL);
+       else
+               inotify->inbox_log_path =
+                       i_strconcat(inotify->inbox->index->filepath,
+                                   ".log", NULL);
 }
 
 int mailbox_list_index_notify_init(struct mailbox_list *list,