]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fixed crash in NOTIFY when there were watched namespaces that didn't support...
authorTimo Sirainen <tss@iki.fi>
Thu, 29 Oct 2015 13:29:24 +0000 (15:29 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 29 Oct 2015 13:29:24 +0000 (15:29 +0200)
src/imap/imap-notify.c

index f5b001e45b7fdb7f89c7e4f3fef59d818ed73920..060d4001cef1b053fb6e4fa22749e358bdf977fa 100644 (file)
@@ -245,6 +245,9 @@ static int imap_client_notify_ns(struct imap_notify_namespace *notify_ns)
        const struct mailbox_list_notify_rec *rec;
        int ret, ret2 = 1;
 
+       if (notify_ns->notify == NULL)
+               return 0; /* notifications not supported in this namespace */
+
        while ((ret = mailbox_list_notify_next(notify_ns->notify, &rec)) > 0) {
                if (imap_notify_match(notify_ns, rec)) T_BEGIN {
                        ret2 = imap_notify_next(notify_ns, rec);