Fix possible resource leaks (src/backend/replication/logical/conflict.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Fix possible resource leaks (src/backend/replication/logical/conflict.c)
Date: 2024-09-04 17:53:15
Message-ID: CAEudQAo0LHv64=EAi7DXH02VG0jGrEYjp8fgWHPgXSPZStqn1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

Per Coverity.

The commit 9758174 <http://9758174e2e5cd278cf37e0980da76b51890e0011>,
included the source src/backend/replication/logical/conflict.c.
The function *errdetail_apply_conflict* reports potential conflicts.
But do not care about possible resource leaks.
However, the leaked size can be considerable, since it can have logs with
the LOG level.
The function *ReportSlotInvalidation* has similar utility, but on the
contrary, be careful not to leak.

IMO, these potential leaks need to be fixed.

Patch attached.

best regards,
Ranier Vilela

Attachment Content-Type Size
0001-fix-possible-resources-leaks-conflict.patch application/octet-stream 838 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2024-09-04 17:55:39 Re: gamma() and lgamma() functions
Previous Message 陈宗志 2024-09-04 17:37:34 Re: AIO v2.0