postgresql/src
Alvaro Herrera 49c3000407 Fix (some of) pltcl memory usage
As reported by Bill Parker, PL/Tcl did not validate some malloc() calls
against NULL return.  Fix by using palloc() in a new long-lived memory
context instead.  This allows us to simplify error handling too, by
simply deleting the memory context instead of doing retail frees.

There's still a lot that could be done to improve PL/Tcl's memory
handling ...

This is pretty ancient, so backpatch all the way back.

Author: Michael Paquier and Álvaro Herrera
Discussion: https://www.postgresql.org/message-id/CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw@mail.gmail.com
2015-07-20 14:18:08 +02:00
..
backend Make WaitLatchOrSocket's timeout detection more robust. 2015-07-18 11:47:13 -04:00
bin Fix assorted memory leaks. 2015-07-12 16:25:51 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:06:33 -05:00
include Back-patch some minor bug fixes in GUC code. 2015-06-28 18:38:06 -04:00
interfaces Improve handling of out-of-memory in libpq. 2015-07-07 18:45:17 +03:00
makefiles Remove USE_VPATH make variable from PGXS 2014-12-04 08:45:48 -05:00
pl Fix (some of) pltcl memory usage 2015-07-20 14:18:08 +02:00
port Fix a low-probability crash in our qsort implementation. 2015-07-16 22:57:46 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:35 -04:00
test Fix some typos in regression test comments. 2015-07-05 13:14:50 -04:00
timezone Update time zone data files to tzdata release 2015d. 2015-05-15 19:35:51 -04:00
tools Turn install.bat into a pure one line wrapper fort he perl script. 2015-07-07 16:31:52 +03:00
tutorial pgindent run for 9.4 2014-05-06 12:12:18 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Make numeric form of PG version number readily available in Makefiles. 2015-07-05 12:01:01 -04:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:06:33 -05:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00