Prevent memory leaks in our various bison parsers when an error occurs
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 2 Sep 2008 20:37:55 +0000 (20:37 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 2 Sep 2008 20:37:55 +0000 (20:37 +0000)
commitae1958a82656508f24cf938dee1842d48cc49b8f
treef18a51d7983235097f76da0ecc024f90fccc0593
parent0df74714a0282c055b94b62084cec64bd550c5ef
Prevent memory leaks in our various bison parsers when an error occurs
during parsing.  Formerly the parser's stack was allocated with malloc
and so wouldn't be reclaimed; this patch makes it use palloc instead,
so that flushing the current context will reclaim the memory.  Per
Marko Kreen.
contrib/cube/cubeparse.y
contrib/seg/segparse.y
src/backend/bootstrap/bootparse.y
src/backend/parser/gram.y
src/pl/plpgsql/src/gram.y