From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove redundant null pointer checks before pg_free()
Date: Sun, 03 Jul 2022 07:12:21 +0000
Message-ID: <E1o7tmF-000xmW-T4@gemulon.postgresql.org> (raw)
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(-)
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: peter@eisentraut.org
Subject: Re: pgsql: Remove redundant null pointer checks before pg_free()
In-Reply-To: <E1o7tmF-000xmW-T4@gemulon.postgresql.org>
References: <E1o7tmF-000xmW-T4@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