Remove custom memory allocation layer in pgcrypto
authorMichael Paquier <michael@paquier.xyz>
Fri, 25 Sep 2020 01:25:55 +0000 (10:25 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 25 Sep 2020 01:25:55 +0000 (10:25 +0900)
commitca7f8e2b86e5f15a40b67e6199d714f45a467ff1
tree19c94a35cb8ff4902d4b4f7b477ace69e1d34a33
parenta45bc8a4f6495072bc48ad40a5aa0304979114f7
Remove custom memory allocation layer in pgcrypto

PX_OWN_ALLOC was intended as a way to disable the use of palloc(), and
over the time new palloc() or equivalent calls have been added like in
32984d8, making this extra layer losing its original purpose.  This
simplifies on the way some code paths to use palloc0() rather than
palloc() followed by memset(0).

Author: Daniel Gustafsson
Discussion: https://postgr.es/m/A5BFAA1A-B2E8-4CBC-895E-7B1B9475A527@yesql.se
17 files changed:
contrib/pgcrypto/imath.c
contrib/pgcrypto/internal-sha2.c
contrib/pgcrypto/internal.c
contrib/pgcrypto/mbuf.c
contrib/pgcrypto/openssl.c
contrib/pgcrypto/pgp-cfb.c
contrib/pgcrypto/pgp-compress.c
contrib/pgcrypto/pgp-decrypt.c
contrib/pgcrypto/pgp-encrypt.c
contrib/pgcrypto/pgp-mpi-internal.c
contrib/pgcrypto/pgp-mpi.c
contrib/pgcrypto/pgp-pubenc.c
contrib/pgcrypto/pgp-pubkey.c
contrib/pgcrypto/pgp.c
contrib/pgcrypto/px-hmac.c
contrib/pgcrypto/px.c
contrib/pgcrypto/px.h