pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.
Date: Fri, 07 Jun 2019 09:47:09 +0000
Message-ID: <E1hZBSn-0008NC-B5@gemulon.postgresql.org> (raw)

Fix copy-pasto in freeing memory on error in vacuumlo.

It's harmless to call PQfreemem() with a NULL argument, so the only
consequence was that if allocating 'schema' failed, but allocating 'table'
or 'field' succeeded, we would leak a bit of memory. That's highly
unlikely to happen, so this is just academical, but let's get it right.

Per bug #15838 from Timur Birsh. Backpatch back to 9.5, where the
PQfreemem() calls were introduced.

Discussion: https://www.postgresql.org/message-id/15838-3221652c72c5e69d@postgresql.org

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2558776b415097610ab69a03604e79d6958608bc

Modified Files
--------------
contrib/vacuumlo/vacuumlo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1hZBSn-0008NC-B5@gemulon.postgresql.org>
Permalink:  ../E1hZBSn-0008NC-B5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hZBSn-0008NC-B5@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.
  In-Reply-To: <E1hZBSn-0008NC-B5@gemulon.postgresql.org>
  References: <E1hZBSn-0008NC-B5@gemulon.postgresql.org>

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

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