Skip to content

Commit

Permalink
lazy-expunge: Fixed crash if lazy_expunge-namespace was not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Mar 21, 2016
1 parent 65d8efa commit 4a76960
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/lazy-expunge/lazy-expunge-plugin.c
Expand Up @@ -445,8 +445,10 @@ lazy_expunge_mail_namespaces_created(struct mail_namespace *namespaces)
/* see if it's set to namespace root itself. in that case we
store all the expunged mails to the namespace root. */
luser->lazy_ns = mail_namespace_find_prefix_nosep(namespaces, luser->env);
luser->lazy_mailbox_vname = p_strndup(namespaces->user->pool,
luser->lazy_ns->prefix, luser->lazy_ns->prefix_len-1);
if (luser->lazy_ns != NULL) {
luser->lazy_mailbox_vname = p_strndup(namespaces->user->pool,
luser->lazy_ns->prefix, luser->lazy_ns->prefix_len-1);
}
}
if (luser->lazy_ns == NULL)
i_fatal("lazy_expunge: Unknown namespace: '%s'", luser->env);
Expand Down

0 comments on commit 4a76960

Please sign in to comment.