Mercurial > dovecot > core-2.2
changeset 19340:787cfed25b0f
imap: Fixed crash in NOTIFY when there were watched namespaces that didn't support NOTIFY.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 29 Oct 2015 15:29:24 +0200 |
parents | 594cd05217eb |
children | 1e7fe403dd50 |
files | src/imap/imap-notify.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-notify.c Thu Oct 29 15:06:16 2015 +0200 +++ b/src/imap/imap-notify.c Thu Oct 29 15:29:24 2015 +0200 @@ -245,6 +245,9 @@ 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);