Commit d4c0b7a
committed
[yugabyte#27554] Ysql: Call YBCFreeStatus in yb_cancel_transaction to fix possible memory leak
Summary:
Seen in
PgCancelTxnTest_Simple.log but possibly contributing to other asan failures too.
`yb_cancel_transaction` does not free the YbcStatus created in
https://phorge.dev.yugabyte.com/diffusion/YBDB/browse/master/src/postgres/src/backend/utils/misc/pg_yb_utils.c$5318
YBCFreeStatus(status); should be called to reclaim memory.
The issue is more visible after 0020131, but is not caused by this diff.
More like a day-0 issue going back to D26550 / 29f8ac4
Jira: DB-17117
Test Plan: yb_build.sh asan --cxx-test pgwrapper_pg_txn_status-test --gtest_filter PgCancelTxnTest.Simple --clang19
Reviewers: jason, pjain, hsunder, telgersma
Reviewed By: hsunder, telgersma
Subscribers: telgersma, ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D446361 parent 006c7f3 commit d4c0b7a
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5328 | 5328 | | |
5329 | 5329 | | |
5330 | 5330 | | |
| 5331 | + | |
5331 | 5332 | | |
5332 | 5333 | | |
| 5334 | + | |
5333 | 5335 | | |
5334 | 5336 | | |
5335 | 5337 | | |
| |||
0 commit comments