aboutsummaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgp-encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/pgp-encrypt.c')
-rw-r--r--contrib/pgcrypto/pgp-encrypt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c
index 46518942ac2..f7467c9b1cb 100644
--- a/contrib/pgcrypto/pgp-encrypt.c
+++ b/contrib/pgcrypto/pgp-encrypt.c
@@ -178,8 +178,7 @@ encrypt_init(PushFilter *next, void *init_arg, void **priv_p)
if (res < 0)
return res;
- st = px_alloc(sizeof(*st));
- memset(st, 0, sizeof(*st));
+ st = palloc0(sizeof(*st));
st->ciph = ciph;
*priv_p = st;
@@ -219,7 +218,7 @@ encrypt_free(void *priv)
if (st->ciph)
pgp_cfb_free(st->ciph);
px_memset(st, 0, sizeof(*st));
- px_free(st);
+ pfree(st);
}
static const PushFilterOps encrypt_filter = {
@@ -241,7 +240,7 @@ pkt_stream_init(PushFilter *next, void *init_arg, void **priv_p)
{
struct PktStreamStat *st;
- st = px_alloc(sizeof(*st));
+ st = palloc(sizeof(*st));
st->final_done = 0;
st->pkt_block = 1 << STREAM_BLOCK_SHIFT;
*priv_p = st;
@@ -301,7 +300,7 @@ pkt_stream_free(void *priv)
struct PktStreamStat *st = priv;
px_memset(st, 0, sizeof(*st));
- px_free(st);
+ pfree(st);
}
static const PushFilterOps pkt_stream_filter = {