summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistsplit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2012-07-15 13:28:27 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2012-07-15 13:28:27 -0400
commit1de1e3d440464a54d8f6a89c59c1f5a8c3e5731b (patch)
tree53eab4958562243be8f265e180675263f86c82e7 /src/backend/access/gist/gistsplit.c
parentb9edaa784e407d1b6e890b776c607a26f3aa7e49 (diff)
Prevent corner-case core dump in rfree().
rfree() failed to cope with the case that pg_regcomp() had initialized the regex_t struct but then failed to allocate any memory for re->re_guts (ie, the first malloc call in pg_regcomp() failed). It would try to touch the guts struct anyway, and thus dump core. This is a sufficiently narrow corner case that it's not surprising it's never been seen in the field; but still a bug is a bug, so patch all active branches. Noted while investigating whether we need to call pg_regfree after a failure return from pg_regcomp. Other than this bug, it turns out we don't, so adjust comments appropriately.
Diffstat (limited to 'src/backend/access/gist/gistsplit.c')
0 files changed, 0 insertions, 0 deletions