summaryrefslogtreecommitdiff
path: root/pith/smime.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-05-18 17:12:19 -0600
committerEduardo Chappa <chappa@washington.edu>2018-05-18 17:12:19 -0600
commit58396d907b993f849a7f32b9665b793c9a5c5d0e (patch)
treeff6c9b6b1e075c9f05938a4292a4a7a6a31aa2f5 /pith/smime.c
parentae4bbcf4e8bb991ad3106ff0d7799276912c5815 (diff)
downloadalpine-58396d907b993f849a7f32b9665b793c9a5c5d0e.tar.xz
* Release memory of a conversion table to UTF-8, if this was created by
us. * Some distributions of OpenSSL do not define ERR_free_strings and EVP_cleanup, so we only execute them when defined. Reported by Erich Eckner.
Diffstat (limited to 'pith/smime.c')
-rw-r--r--pith/smime.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pith/smime.c b/pith/smime.c
index 9a901a82..ebafe268 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -1224,8 +1224,12 @@ smime_deinit(void)
dprint((9, "smime_deinit()"));
app_RAND_write_file(NULL);
if (s_cert_store != NULL) X509_STORE_free(s_cert_store);
+#ifdef ERR_free_strings
ERR_free_strings();
+#endif /* ERR_free_strings */
+#ifdef EVP_cleanup
EVP_cleanup();
+#endif /* EVP_cleanup */
free_smime_struct(&ps_global->smime);
}