Mercurial > dovecot > core-2.2
changeset 16512:04ee59c96fc9
lib-storage: Fixed crash with listing shared mailboxes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 13 Jun 2013 23:22:20 +0300 |
parents | 91765ba4d534 |
children | e6aa668477d8 |
files | src/lib-storage/index/shared/shared-list.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/shared/shared-list.c Thu Jun 13 18:54:07 2013 +0300 +++ b/src/lib-storage/index/shared/shared-list.c Thu Jun 13 23:22:20 2013 +0300 @@ -46,10 +46,12 @@ name = mailbox_list_get_storage_name(*list, vname); if (*name == '\0' && (ns->flags & NAMESPACE_FLAG_AUTOCREATED) == 0) { /* trying to access the shared/ prefix itself */ - } else { - if (shared_storage_get_namespace(&ns, &name) < 0) - return -1; + *storage_r = ns->storage; + return 0; } + + if (shared_storage_get_namespace(&ns, &name) < 0) + return -1; *list = ns->list; return mailbox_list_get_storage(list, vname, storage_r); }