From: Timo Sirainen Date: Thu, 9 Dec 2021 16:31:04 +0000 (+0100) Subject: var-expand-crypt: Remove dead code X-Git-Tag: 2.3.18~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2302fcd607ba252ba067f0a3325fcd17755a0381;p=thirdparty%2Fdovecot%2Fcore.git var-expand-crypt: Remove dead code It's correct that dcrypt library shouldn't be deinitialized at plugin deinit. --- diff --git a/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c b/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c index 75ba350a17..1f6cce7fe6 100644 --- a/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c +++ b/src/plugins/var-expand-crypt/var-expand-crypt-plugin.c @@ -35,8 +35,6 @@ void var_expand_crypt_deinit(void); void auth_var_expand_crypt_init(struct module *module); void auth_var_expand_crypt_deinit(void); -static bool has_been_init; - static int var_expand_crypt_settings(struct var_expand_crypt_context *ctx, const char *const *args, const char **error_r) @@ -141,7 +139,7 @@ var_expand_encrypt(struct var_expand_context *_ctx, const char *key, const char *field, const char **result_r, const char **error_r) { - if (!has_been_init && !var_expand_crypt_initialize(error_r)) + if (!var_expand_crypt_initialize(error_r)) return -1; const char *p = strchr(key, ';'); @@ -222,7 +220,7 @@ var_expand_decrypt(struct var_expand_context *_ctx, const char *key, const char *field, const char **result_r, const char **error_r) { - if (!has_been_init && !var_expand_crypt_initialize(error_r)) + if (!var_expand_crypt_initialize(error_r)) return -1; const char *p = strchr(key, ';'); @@ -324,8 +322,6 @@ void var_expand_crypt_init(struct module *module ATTR_UNUSED) void var_expand_crypt_deinit(void) { var_expand_unregister_func_array(funcs); - if (has_been_init) - dcrypt_deinitialize(); } void auth_var_expand_crypt_init(struct module *module)