Обсуждение: Fixes for a couple of resource leaks

Поиск
Список
Период
Сортировка

Fixes for a couple of resource leaks

От
Michael Paquier
Дата:
Hi all,

Coverity is pointing out a couple of resource leaks:
- In DropReplicationSlot@streamutil.c, query is leaked.
- In getTransforms@pg_dump.c, the alloced result of get_language_name is not free'd. Other code paths calling this routine do the job.
- In libpqGetCurrentXlogInsertLocation@libpq_fetch.c (pg_rewind), the value "val" returned by run_simple_query should be free'd. Other code paths do so.
- In libpqProcessFileList@libpq_fetch.c, a call to PQclear is missing for a query result.
- In vacuum_one_database@vacuumdb.c, a call to PQclear is missing.
Attached is a patch to address all those things. Backpatches would be good to have as well.
Regards,
--
Michael
Вложения

Re: Fixes for a couple of resource leaks

От
Tom Lane
Дата:
Michael Paquier <michael.paquier@gmail.com> writes:
> Coverity is pointing out a couple of resource leaks:
> ...
> Attached is a patch to address all those things. Backpatches would be good
> to have as well.

I'll take this up, unless some other committer is already on it.
        regards, tom lane



Re: Fixes for a couple of resource leaks

От
Michael Paquier
Дата:
On Mon, Jul 13, 2015 at 4:06 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> Coverity is pointing out a couple of resource leaks:
>> ...
>> Attached is a patch to address all those things. Backpatches would be good
>> to have as well.
>
> I'll take this up, unless some other committer is already on it.

Thanks for taking up those things! Next time I'll mention as well
until which version each fix should be backpatched to facilitate
committer's work. That was obviously bad of me to not mention it.
-- 
Michael