set_input.local_ip = input->local_ip;
set_input.remote_ip = input->remote_ip;
}
- if (ctx->set_cache == NULL) {
+ if (input == NULL) {
+ /* global settings read - don't create a cache for thi */
+ } else if (ctx->set_cache == NULL) {
ctx->set_cache_module = p_strdup(ctx->pool, set_input.module);
ctx->set_cache_service = p_strdup(ctx->pool, set_input.service);
ctx->set_cache = master_service_settings_cache_init(
dyn_parsers = mail_storage_get_dynamic_parsers(pool);
if (null_strcmp(set_input.module, ctx->set_cache_module) == 0 &&
- null_strcmp(set_input.service, ctx->set_cache_service) == 0) {
+ null_strcmp(set_input.service, ctx->set_cache_service) == 0 &&
+ ctx->set_cache != NULL) {
if (master_service_settings_cache_read(ctx->set_cache,
&set_input, dyn_parsers,
parser_r, error_r) < 0) {