return 0;
}
-static void acl_backend_vfile_deinit(struct acl_backend *backend)
+static void acl_backend_vfile_deinit(struct acl_backend *_backend)
{
- pool_unref(&backend->pool);
+ struct acl_backend_vfile *backend =
+ (struct acl_backend_vfile *)_backend;
+
+ if (backend->acllist_pool != NULL) {
+ array_free(&backend->acllist);
+ pool_unref(&backend->acllist_pool);
+ }
+ pool_unref(&backend->backend.pool);
}
static struct acl_object *
struct acl_cache *cache = *_cache;
*_cache = NULL;
+
+ acl_cache_flush_all(cache);
array_free(&cache->right_idx_name_map);
hash_destroy(&cache->right_name_idx_map);
hash_destroy(&cache->objects);
mailbox_list_iter_update(&ctx->ctx, ctx->tree,
glob, FALSE, TRUE, name);
}
+ acl_backend_nonowner_lookups_iter_deinit(&nonowner_list_ctx);
+
if (ret == 0)
break;
/* try again */
mailbox_tree_deinit(&ctx->tree);
- acl_backend_nonowner_lookups_iter_deinit(&nonowner_list_ctx);
}
if (ret < 0)
return FALSE;
}
if (ctx->tree_iter != NULL)
mailbox_tree_iterate_deinit(&ctx->tree_iter);
+ if (ctx->tree != NULL)
+ mailbox_tree_deinit(&ctx->tree);
i_free(ctx);
return ret;