postgresql/src/common
Peter Eisentraut 30652b356d Fix mismatched deallocation functions
In fe_memutils.h, we have various allocation functions beginning with
either pg_ or p.  The pg_ functions have a matching pg_free() for
freeing memory, while the p functions use pfree().  In some cases, we
were allocating memory with one set of functions while using the wrong
deallocation functions.  This creates a tiny bit of mental overhead
when reading code.  Matching up allocation and deallocation functions
makes it easier to analyze memory handling in a code path.

Author: Tristan Partin <tristan@partin.io>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/flat/DIBZE2B6SVF2.28R3EQTYJSWIG@partin.io
2026-07-01 13:50:08 +02:00
..
unicode Don't accept length of -1 in pg_locale.h APIs. 2026-05-15 11:09:15 -07:00
.gitignore Replace the data structure used for keyword lookup. 2019-01-06 17:02:57 -05:00
archive.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
base64.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
binaryheap.c Remove #include <math.h> where not needed 2026-01-15 19:09:47 +01:00
blkreftable.c Fix assorted places that need to use palloc_array(). 2026-05-11 05:13:46 -07:00
checksum_helper.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
compression.c Move tar detection and compression logic to common. 2026-03-20 15:31:35 -04:00
config_info.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
controldata_utils.c Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
cryptohash.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
cryptohash_openssl.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
d2s.c Clean up inconsistencies in CPU-identification macros. 2026-06-30 12:21:06 -04:00
d2s_full_table.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
d2s_intrinsics.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
digit_table.h Change floating-point output format for improved performance. 2019-02-13 15:20:33 +00:00
encnames.c Fix comments for Korean encodings in encnames.c 2026-04-16 18:17:05 +12:00
exec.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
f2s.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
fe_memutils.c Make palloc_array() and friends safe against integer overflow. 2026-05-11 05:13:46 -07:00
file_perm.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
file_utils.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
hashfn.c Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
hmac.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
hmac_openssl.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
instr_time.c pg_test_timing: Show additional TSC clock source debug info 2026-05-16 11:51:34 -04:00
ip.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
jsonapi.c Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
keywords.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
kwlookup.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
link-canary.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
logging.c Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
Makefile instrumentation: Standardize ticks to nanosecond conversion method 2026-04-07 13:00:24 -04:00
md5.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
md5_common.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
md5_int.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
meson.build instrumentation: Standardize ticks to nanosecond conversion method 2026-04-07 13:00:24 -04:00
parse_manifest.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
percentrepl.c Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
pg_get_line.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pg_lzcompress.c Fix heap-buffer-overflow in pglz_decompress() on corrupt input. 2026-04-10 07:13:08 -04:00
pg_prng.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgfnames.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
psprintf.c Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
relpath.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
restricted_token.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
rmtree.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
ryu_common.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
saslprep.c Make implementation of SASLprep compliant for ASCII characters 2026-03-24 08:29:23 +09:00
scram-common.c Fix accidentally cast away qualifiers 2026-01-26 16:02:31 +01:00
sha1.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
sha1_int.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
sha2.c Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
sha2_int.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
sprompt.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
string.c Revert "Replace pg_restrict by standard restrict" 2026-01-14 15:12:25 +01:00
stringinfo.c Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
unicode_case.c Don't accept length of -1 in pg_locale.h APIs. 2026-05-15 11:09:15 -07:00
unicode_category.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
unicode_norm.c Fix off-by-one with NFC recomposition for Hangul U+11A7 (TBASE) 2026-06-05 07:50:08 +09:00
username.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
wait_error.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
wchar.c Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00