# HG changeset patch # User Timo Sirainen # Date 1458565808 -32400 # Node ID 7b498de3bdba3050d5e2c13660b20aac0918de69 # Parent 7ffdbac8e3ae5eac52b984cb615c2d26fe0e88c5 lazy-expunge: Fixed crash if lazy_expunge-namespace was not found. diff -r 7ffdbac8e3ae -r 7b498de3bdba src/plugins/lazy-expunge/lazy-expunge-plugin.c --- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c Mon Mar 21 21:51:49 2016 +0900 +++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c Mon Mar 21 22:10:08 2016 +0900 @@ -445,8 +445,10 @@ /* 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);