Re: Small memory fixes for pg_createsubcriber
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2025-02-12T21:17:53Z
Lists: pgsql-hackers
Ranier Vilela <ranier.vf@gmail.com> writes: > Coverity has some reports about pg_createsubcriber. > CID 1591322: (#1 of 1): Resource leak (RESOURCE_LEAK) > 10. leaked_storage: Variable dbname going out of scope leaks the storage it > points to. FTR, the security team's Coverity instance also complained about that. I was planning to fix it after the release freeze lifted, but you beat me to it, which is fine. Our report turned up a couple other things that I just pushed fixes for. (It seems like Coverity must've updated their rules recently, because we also got a bunch of false-positive reports that were not there before, mostly in pre-existing code.) regards, tom lane
Commits
-
pg_upgrade: Fix inconsistency in memory freeing
- 9ca2145b00fb 16.9 landed
- ee78823ff5f6 17.5 landed
- 2a083ab807db 18.0 landed
-
pg_amcheck: Fix inconsistency in memory freeing
- 35a591a0486f 14.18 landed
- ec741d48036a 15.13 landed
- 816149dc6bf9 16.9 landed
- f903d4da9276 17.5 landed
- 48e4ae9a0707 18.0 landed
-
Fix some inconsistencies with memory freeing in pg_createsubscriber
- ff6d9cfcb17e 17.4 landed
- 5b94e2753439 18.0 landed
-
Drop pre-existing subscriptions from the converted subscriber.
- 4867f8a555ce 18.0 cited