How to properly fix memory leak

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: How to properly fix memory leak
Date: 2025-04-26 04:55:14
Message-ID: CAKFQuwbZxuVPZTwMmxqBYUFNajCPFKrOY12co+0pFK-eTHcEuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, April 25, 2025, Igor Korot <ikorot01(at)gmail(dot)com> wrote:

>
> And the error case was handled correctly, right?
>

Seems like answering that requires knowing what the query is or can be. I
also have no idea what idiomatic code looks like. Though, I’d probably use
PQresultErrorMessage and check affirmatively for the tuples and error cases
and have a final else should the status be something unexpected.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2025-04-26 05:12:59 Re: How to properly fix memory leak
Previous Message Igor Korot 2025-04-26 04:17:17 Re: How to properly fix memory leak