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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix copy-pasto in freeing memory on error in vacuumlo.
Date: 2019-06-07 09:47:09
Message-ID: E1hZBSn-0008N6-Ar@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/77b68e3a4f854d95350a3366ecfc8b3b506ebaa7

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

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-06-07 11:52:19 pgsql: Improve some comments in pg_checksums about the needed clean shu
Previous Message Alvaro Herrera 2019-06-07 04:49:19 pgsql: Fix default_tablespace usage for partitioned tables