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:08:41 +0000 (19:08 -0700)
commitaf7e90a2778625d63add69165fb68c370509a199
treec607a574b3583aa4eb31beea75d22b2ed09dea0c
parent3e60e956b0017ae9d329bf242e76c4487fb39b4d
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