summaryrefslogtreecommitdiff
path: root/contrib/dict_xsyn/dict_xsyn.control
diff options
context:
space:
mode:
authorTom Lane2025-08-03 01:26:21 +0000
committerTom Lane2025-08-03 01:59:46 +0000
commit4fbfdde58e4cd091f88737dffa241b08c23d8829 (patch)
tree909fea279aa2708dca75f87a7b727dd7f0cec750 /contrib/dict_xsyn/dict_xsyn.control
parentb102c8c4733cf76ff0635dc440ee8dd11487ed95 (diff)
Avoid leakage of zero-length arrays in partition_bounds_copy().HEADmaster
If ndatums is zero, the code would allocate zero-length boundKinds and boundDatums chunks, which would have nothing pointing to them, leading to Valgrind complaints. Rearrange the code to avoid the useless pallocs, and also to not bother computing byval/typlen when they aren't used. I'm unsure why I didn't see this in my Valgrind testing back in May. This code hasn't changed since then, but maybe we added a regression test that reaches this edge case. Or possibly I just failed to notice the reports, which do say "0 bytes lost". Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/285483.1746756246@sss.pgh.pa.us
Diffstat (limited to 'contrib/dict_xsyn/dict_xsyn.control')
0 files changed, 0 insertions, 0 deletions