diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2025-05-10 20:22:39 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2025-05-10 20:22:39 -0400 |
commit | d4a7e4e179f946e12708f758d30a07f931fd5a84 (patch) | |
tree | 7f328eff6e28e4b72ab4d5a5249eb325bda0332e /src/backend/utils/adt/network_gist.c | |
parent | 4a4ee0c2c1e53401924101945ac3d517c0a8a559 (diff) | |
download | postgresql-d4a7e4e179f946e12708f758d30a07f931fd5a84.tar.gz postgresql-d4a7e4e179f946e12708f758d30a07f931fd5a84.zip |
Fix incorrect "return NULL" in BumpAllocLarge().
This must be "return MemoryContextAllocationFailure(context, size, flags)"
instead. The effect of this oversight is that if we got a malloc
failure right here, the code would act as though MCXT_ALLOC_NO_OOM
had been specified, whether it was or not. That would likely lead
to a null-pointer-dereference crash at the unsuspecting call site.
Noted while messing with a patch to improve our Valgrind leak
detection support. Back-patch to v17 where this code came in.
Diffstat (limited to 'src/backend/utils/adt/network_gist.c')
0 files changed, 0 insertions, 0 deletions