]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Take a little more care in set_backtrace().
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Aug 2025 17:01:17 +0000 (13:01 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Aug 2025 17:01:17 +0000 (13:01 -0400)
commit5c8eda1f72a2b0a8c48ada9b872eb5ef581f7c81
treeceb667240440a2feb05c90a93903261a14b1341d
parent4fbfdde58e4cd091f88737dffa241b08c23d8829
Take a little more care in set_backtrace().

Coverity complained that the "errtrace" string is leaked if we return
early because backtrace_symbols fails.  Another criticism that could
be leveled at this is that not providing any hint of what happened is
user-unfriendly.  Fix that.

The odds of a leak here are small, and typically it wouldn't matter
anyway since the leak will be in ErrorContext which will soon get
reset.  So I'm not feeling a need to back-patch.
src/backend/utils/error/elog.c