mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Remove redundant null pointer checks before pg_free()
These are especially useless because the whole point of pg_free() was to do that very check before calling free(). pg_free() could be removed altogether, but I'm keeping it here to keep the API consistent. Discussion: https://www.postgresql.org/message-id/flat/dac5d2d0-98f5-94d9-8e69-46da2413593d%40enterprisedb.com
This commit is contained in:
@ -3492,8 +3492,7 @@ do_connect(enum trivalue reuse_previous_specification,
|
||||
} /* end retry loop */
|
||||
|
||||
/* Release locally allocated data, whether we succeeded or not */
|
||||
if (password)
|
||||
pg_free(password);
|
||||
pg_free(password);
|
||||
if (cinfo)
|
||||
PQconninfoFree(cinfo);
|
||||
|
||||
|
Reference in New Issue
Block a user