public inbox for [email protected]  
help / color / mirror / Atom feed
From: Igor Korot <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Any reason why PQclear() do not assign the pointer to NULL?
Date: Tue, 31 Mar 2026 23:49:21 -0700
Message-ID: <CA+FnnTzJF=ebHMQQ7gw1X3Ax+99gnWbCQ00Sw0wTgGYTOyXeMQ@mail.gmail.com> (raw)

Hi,
It only frees memory.

So the following code snippet will crash:

[code]
PQclear( res );
if( serverVersion > curremt_running_vrsion )
{
    res = PQprepare();
//* error checking*/
}
PQclear( res );
[/code]

Thank you.






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Any reason why PQclear() do not assign the pointer to NULL?
  In-Reply-To: <CA+FnnTzJF=ebHMQQ7gw1X3Ax+99gnWbCQ00Sw0wTgGYTOyXeMQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox