Remove redundant null pointer checks before PQclear and PQconninfoFree
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/dblink/dblink.c | modified | +2 −4 |
| contrib/postgres_fdw/postgres_fdw.c | modified | +8 −16 |
| doc/src/sgml/libpq.sgml | modified | +5 −0 |
| src/bin/pg_basebackup/streamutil.c | modified | +2 −4 |
| src/bin/pg_dump/pg_dumpall.c | modified | +1 −2 |
| src/bin/psql/command.c | modified | +1 −2 |
| src/bin/psql/common.c | modified | +1 −2 |
| src/bin/psql/describe.c | modified | +1 −2 |
| src/fe_utils/query_utils.c | modified | +1 −2 |
| src/interfaces/ecpg/ecpglib/descriptor.c | modified | +1 −2 |
| src/interfaces/ecpg/ecpglib/execute.c | modified | +1 −2 |
| src/interfaces/libpq/fe-connect.c | modified | +2 −4 |
| src/interfaces/libpq/fe-exec.c | modified | +3 −6 |
Documentation touched
Discussion
- libpq: Remove redundant null pointer checks before free() 10 messages · 2022-06-16 → 2022-06-19