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:04 +0000 (19:09 -0700)
commitdcb7cf945c88eabce7f8350023b8184266d96a12
treecf7307abaebb53a0da112d20de0abe5f02f0cb9e
parente2663a63c3b9459651f9370a971966d4fcfe0332
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