Re: Small memory fixes for pg_createsubcriber

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small memory fixes for pg_createsubcriber
Date: 2025-02-12 21:17:53
Message-ID: 3470988.1739395073@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ranier Vilela <ranier(dot)vf(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-02-12 21:18:06 Re: Improve CRC32C performance on SSE4.2
Previous Message Nathan Bossart 2025-02-12 21:04:20 Re: describe special values in GUC descriptions more consistently