]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Don't crash if shared_storage_get_namespace() fails.
authorTimo Sirainen <tss@iki.fi>
Fri, 3 Apr 2009 16:35:02 +0000 (12:35 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 3 Apr 2009 16:35:02 +0000 (12:35 -0400)
--HG--
branch : HEAD

src/plugins/acl/acl-shared-storage.c

index 4ee633873331de767e7daa58ab4a36d92a8e2b7f..806ef926a98f33b7dc55fe3cba787f7772a2e1df 100644 (file)
@@ -46,7 +46,8 @@ acl_shared_namespace_add(struct mail_user *user,
        str = t_str_new(128);
        var_expand(str, sstorage->ns_prefix_pattern, tab);
        mailbox = str_c(str);
-       shared_storage_get_namespace(&sstorage->storage, &mailbox, &ns);
+       if (shared_storage_get_namespace(&sstorage->storage, &mailbox, &ns) < 0)
+               return;
 
        /* check if there are any mailboxes really visible to us */
        iter = mailbox_list_iter_init(ns->list, "*",