]> git.ipfire.org Git - thirdparty/postgresql.git/commit
simplehash: Free collisions array in SH_STAT
authorAndres Freund <andres@anarazel.de>
Mon, 8 Apr 2024 02:00:11 +0000 (19:00 -0700)
committerAndres Freund <andres@anarazel.de>
Mon, 8 Apr 2024 02:09:08 +0000 (19:09 -0700)
commit4b179a47242993fe48b1bfa21b17dc9d5e2b35a2
tree5bb7da274fbcce6dce4331d91bec73a906c77f68
parent0d95711ae0d3b328b0a3534a546a4f848d273e08
simplehash: Free collisions array in SH_STAT

While SH_STAT() is only used for debugging, the allocated array can be large,
and therefore should be freed.

It's unclear why coverity started warning now.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Coverity
Discussion: https://postgr.es/m/3005248.1712538233@sss.pgh.pa.us
Backpatch: 12-
src/include/lib/simplehash.h