mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
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
This commit is contained in:
@@ -3766,8 +3766,7 @@ keep_going: /* We will come back to here until there is
|
||||
}
|
||||
|
||||
/* Something went wrong with "SHOW transaction_read_only". */
|
||||
if (res)
|
||||
PQclear(res);
|
||||
PQclear(res);
|
||||
|
||||
/* Append error report to conn->errorMessage. */
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
@@ -3818,8 +3817,7 @@ keep_going: /* We will come back to here until there is
|
||||
}
|
||||
|
||||
/* Something went wrong with "SELECT pg_is_in_recovery()". */
|
||||
if (res)
|
||||
PQclear(res);
|
||||
PQclear(res);
|
||||
|
||||
/* Append error report to conn->errorMessage. */
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
|
||||
Reference in New Issue
Block a user