From 5faef9d582012433db9ad05af27a77bd591508e1 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 3 Jul 2022 20:11:05 +0200 Subject: 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 --- doc/src/sgml/libpq.sgml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 37ec3cb4e5f..74456aa69d7 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -3628,6 +3628,9 @@ char *PQresultErrorField(const PGresult *res, int fieldcode); void PQclear(PGresult *res); + + If the argument is a NULL pointer, no operation is + performed. @@ -6670,6 +6673,8 @@ void PQfreemem(void *ptr); void PQconninfoFree(PQconninfoOption *connOptions); + If the argument is a NULL pointer, no operation is + performed. -- cgit v1.2.3