aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-07-18 13:00:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-07-18 13:00:52 -0400
commit8a817785adf34387dce3be4b9f2b201cc9ff835d (patch)
tree3a05377d97cedf914236404e5641b1b250ba3c81 /src/backend/access/gist
parenta41dc73211c9ab579bb2cd87ad7d0a6ecf0806fe (diff)
downloadpostgresql-8a817785adf34387dce3be4b9f2b201cc9ff835d.tar.gz
postgresql-8a817785adf34387dce3be4b9f2b201cc9ff835d.zip
Fix two low-probability memory leaks in regular expression parsing.
If pg_regcomp failed after having invoked markst/cleanst, it would leak any "struct subre" nodes it had created. (We've already detected all regex syntax errors at that point, so the only likely causes of later failure would be query cancel or out-of-memory.) To fix, make sure freesrnode knows the difference between the pre-cleanst and post-cleanst cleanup procedures. Add some documentation of this less-than-obvious point. Also, newlacon did the wrong thing with an out-of-memory failure from realloc(), so that the previously allocated array would be leaked. Both of these are pretty low-probability scenarios, but a bug is a bug, so patch all the way back. Per bug #10976 from Arthur O'Dwyer.
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions