aboutsummaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgp.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/pgp.c')
-rw-r--r--contrib/pgcrypto/pgp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/pgcrypto/pgp.c b/contrib/pgcrypto/pgp.c
index 9b245fee61b..3e9c2fef9bc 100644
--- a/contrib/pgcrypto/pgp.c
+++ b/contrib/pgcrypto/pgp.c
@@ -200,8 +200,7 @@ pgp_init(PGP_Context **ctx_p)
{
PGP_Context *ctx;
- ctx = px_alloc(sizeof *ctx);
- memset(ctx, 0, sizeof *ctx);
+ ctx = palloc0(sizeof *ctx);
ctx->cipher_algo = def_cipher_algo;
ctx->s2k_cipher_algo = def_s2k_cipher_algo;
@@ -226,7 +225,7 @@ pgp_free(PGP_Context *ctx)
if (ctx->pub_key)
pgp_key_free(ctx->pub_key);
px_memset(ctx, 0, sizeof *ctx);
- px_free(ctx);
+ pfree(ctx);
return 0;
}