diff --git a/src/lib-sieve/plugins/include/ext-include-common.c b/src/lib-sieve/plugins/include/ext-include-common.c index 59e61825e4f4d71ea98a06a97f2319f45360aa10..bb66aa5e08fd61ccb1ca289e920eb0c6c0fe2dce 100644 --- a/src/lib-sieve/plugins/include/ext-include-common.c +++ b/src/lib-sieve/plugins/include/ext-include-common.c @@ -118,7 +118,6 @@ void ext_include_unload(const struct sieve_extension *ext) { struct ext_include_context *extctx = ext->context; - sieve_storage_unref(&extctx->global_storage); sieve_storage_unref(&extctx->personal_storage); i_free(extctx->global_location); @@ -162,14 +161,9 @@ ext_include_open_script_global(struct sieve_instance *svinst, *error_code_r = SIEVE_ERROR_NOT_FOUND; return -1; } - if (extctx->global_storage == NULL && - sieve_storage_create(svinst, svinst->event, - extctx->global_location, 0, - &extctx->global_storage, error_code_r) < 0) - return -1; - return sieve_storage_open_script(extctx->global_storage, script_name, - script_r, error_code_r); + return sieve_script_create_open(svinst, extctx->global_location, + script_name, script_r, error_code_r); } int ext_include_open_script(const struct sieve_extension *ext, diff --git a/src/lib-sieve/plugins/include/ext-include-common.h b/src/lib-sieve/plugins/include/ext-include-common.h index 194e4cb2dc7d8f8f75618fa9656c85b1653a0559..aacd1e097dcde5bb3ae95817d860f87b2094302a 100644 --- a/src/lib-sieve/plugins/include/ext-include-common.h +++ b/src/lib-sieve/plugins/include/ext-include-common.h @@ -101,7 +101,6 @@ struct ext_include_context { /* Configuration */ char *global_location; - struct sieve_storage *global_storage; struct sieve_storage *personal_storage; unsigned int max_nesting_depth;