pgsql: Remove redundant null pointer checks before pg_free()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove redundant null pointer checks before pg_free()
Date: 2022-07-03 07:12:21
Message-ID: E1o7tmF-000xmW-T4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove redundant null pointer checks before pg_free()

These are especially useless because the whole point of pg_free() was
to do that very check before calling free().

pg_free() could be removed altogether, but I'm keeping it here to keep
the API consistent.

Discussion: https://www.postgresql.org/message-id/flat/dac5d2d0-98f5-94d9-8e69-46da2413593d%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/098c703d308fa88dc9e3f9f623ca023ce4717794

Modified Files
--------------
src/bin/pg_basebackup/walmethods.c | 3 +--
src/bin/pg_upgrade/parallel.c | 18 ++++++------------
src/bin/pgbench/pgbench.c | 9 +++------
src/bin/psql/command.c | 3 +--
src/bin/psql/variables.c | 5 ++---
5 files changed, 13 insertions(+), 25 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-07-03 09:54:33 pgsql: Remove redundant null pointer checks before free()
Previous Message Noah Misch 2022-07-03 04:03:52 pgsql: Fix previous commit's ecpg_clocale for ppc Darwin.