From: Timo Sirainen Date: Thu, 5 Feb 2015 17:40:25 +0000 (+0200) Subject: dsync: Fixed crash in earlier patch if node didn't have a namespace. X-Git-Tag: 2.2.16.rc1~85 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed6d4c22d011c83d72abf60c0d57ffa0515b4143;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fixed crash in earlier patch if node didn't have a namespace. This shouldn't have happened except in test-dsync-mailbox-tree-sync, but easier and safer to fix it here. --- diff --git a/src/doveadm/dsync/dsync-mailbox-tree-sync.c b/src/doveadm/dsync/dsync-mailbox-tree-sync.c index 88282b12f6..e1078909b4 100644 --- a/src/doveadm/dsync/dsync-mailbox-tree-sync.c +++ b/src/doveadm/dsync/dsync-mailbox-tree-sync.c @@ -361,7 +361,7 @@ static bool sync_node_is_namespace_prefix(struct dsync_mailbox_tree *tree, struct dsync_mailbox_node *node) { const char *full_name; - unsigned int prefix_len = node->ns->prefix_len; + unsigned int prefix_len = node->ns == NULL ? 0 : node->ns->prefix_len; if (prefix_len == 0) return FALSE;