pgsql: Remove redundant null pointer checks before PQclear and PQconnin

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 PQclear and PQconnin
Date: 2022-07-03 18:23:01
Message-ID: E1o84FH-0012Ja-NT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove redundant null pointer checks before PQclear and PQconninfoFree

These functions already had the free()-like behavior of handling null
pointers as a no-op. But it wasn't documented, so add it explicitly
to the documentation, too.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5faef9d582012433db9ad05af27a77bd591508e1

Modified Files
--------------
contrib/dblink/dblink.c | 6 ++----
contrib/postgres_fdw/postgres_fdw.c | 24 ++++++++----------------
doc/src/sgml/libpq.sgml | 5 +++++
src/bin/pg_basebackup/streamutil.c | 6 ++----
src/bin/pg_dump/pg_dumpall.c | 3 +--
src/bin/psql/command.c | 3 +--
src/bin/psql/common.c | 3 +--
src/bin/psql/describe.c | 3 +--
src/fe_utils/query_utils.c | 3 +--
src/interfaces/ecpg/ecpglib/descriptor.c | 3 +--
src/interfaces/ecpg/ecpglib/execute.c | 3 +--
src/interfaces/libpq/fe-connect.c | 6 ++----
src/interfaces/libpq/fe-exec.c | 9 +++------
13 files changed, 29 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-07-03 19:27:35 pgsql: Simplify tab completion of extension versions, redux.
Previous Message Peter Eisentraut 2022-07-03 09:54:33 pgsql: Remove redundant null pointer checks before free()