aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regcomp.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-07-20 14:18:08 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-07-20 14:18:08 +0200
commit14ade020ffa805b8335af10a11520b7b2249c99e (patch)
treed85ea5abfe78cd90ffd77f5809b90f194220c9de /src/backend/regex/regcomp.c
parent76fa354c533c1955cc5fdcbff4a82edac274174c (diff)
downloadpostgresql-14ade020ffa805b8335af10a11520b7b2249c99e.tar.gz
postgresql-14ade020ffa805b8335af10a11520b7b2249c99e.zip
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
Diffstat (limited to 'src/backend/regex/regcomp.c')
0 files changed, 0 insertions, 0 deletions