OSDN Git Service

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)
commitfbb2b69c8f478c2910a32e25d80eaf67d0dd3cbf
treeb1533d094abd1c506210616b6b77d50cf8b8c812
parentdd6edd5efd042f7aaaccb7606fb5f477c9dc9888
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