summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgp-encrypt.c
diff options
context:
space:
mode:
authorHeikki Linnakangas2016-12-12 09:14:44 +0000
committerHeikki Linnakangas2016-12-12 09:14:44 +0000
commit9bbbf029dded76d7d86053ebad1c5f9ab2948904 (patch)
treee8cc53ac7f7e18b531e8e681e633e006d2cc8388 /contrib/pgcrypto/pgp-encrypt.c
parent41493bac36575c93172644d0eab7045aed8dcc17 (diff)
Fix pgcrypto compilation with OpenSSL 1.1.0.
Was broken by the switch to using OpenSSL's EVP interface for ciphers, in commit 5ff4a67f. Reported by Andres Freund. Fix by Michael Paquier with some kibitzing by me. Discussion: https://www.postgresql.org/message-id/20161201014826.ic72tfkahmevpwz7@alap3.anarazel.de
Diffstat (limited to 'contrib/pgcrypto/pgp-encrypt.c')
-rw-r--r--contrib/pgcrypto/pgp-encrypt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c
index be933bf86c1..d510729e5b4 100644
--- a/contrib/pgcrypto/pgp-encrypt.c
+++ b/contrib/pgcrypto/pgp-encrypt.c
@@ -219,6 +219,8 @@ encrypt_free(void *priv)
{
struct EncStat *st = priv;
+ if (st->ciph)
+ pgp_cfb_free(st->ciph);
px_memset(st, 0, sizeof(*st));
px_free(st);
}