summaryrefslogtreecommitdiff
path: root/src/bin/psql/describe.c
diff options
context:
space:
mode:
authorPeter Eisentraut2022-07-03 18:11:05 +0000
committerPeter Eisentraut2022-07-03 18:11:05 +0000
commit5faef9d582012433db9ad05af27a77bd591508e1 (patch)
treef3ace999fcaf45d69c3eb8428d3afc4819316530 /src/bin/psql/describe.c
parent02c408e21a6e78ff246ea7a1beb4669634fa9c4c (diff)
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
Diffstat (limited to 'src/bin/psql/describe.c')
-rw-r--r--src/bin/psql/describe.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 2df95bc1654..88d92a08ae6 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3492,8 +3492,7 @@ error_return:
free(view_def);
- if (res)
- PQclear(res);
+ PQclear(res);
return retval;
}