summaryrefslogtreecommitdiff
path: root/src/tutorial/funcs_new.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-03-01 21:33:42 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-03-01 21:34:32 -0500
commitb2da7c805cb38b6e880c3218699ce8533eb9b151 (patch)
treeea41ae3605dcf24a99b22cbda9cfe034443afe39 /src/tutorial/funcs_new.c
parentf5185db27f53b85c1386e589d7dfd9e291f3c967 (diff)
Eliminate memory leaks in plperl's spi_prepare() function.
Careless use of TopMemoryContext for I/O function data meant that repeated use of spi_prepare and spi_freeplan would leak memory at the session level, as per report from Christian Schröder. In addition, spi_prepare leaked a lot of transient data within the current plperl function's SPI Proc context, which would be a problem for repeated use of spi_prepare within a single plperl function call; and it wasn't terribly careful about releasing permanent allocations in event of an error, either. In passing, clean up some copy-and-pasteos in query-lookup error messages. Alex Hunsaker and Tom Lane
Diffstat (limited to 'src/tutorial/funcs_new.c')
0 files changed, 0 insertions, 0 deletions