Re: libpq: Remove redundant null pointer checks before free()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Michael Paquier <michael@paquier.xyz>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-06-17T19:31:58Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes: > On 17.06.22 07:11, Tom Lane wrote: >> Notably, I think the choice >> that pfree(NULL) is disallowed traces directly to worries about >> coding-pattern-compatibility with pre-POSIX free(). Should we >> revisit that? > Yes please, and also repalloc(). repalloc no, because you wouldn't know which context to do the allocation in. regards, tom lane
Commits
-
Remove redundant null pointer checks before PQclear and PQconninfoFree
- 5faef9d58201 16.0 landed
-
Remove redundant null pointer checks before free()
- 02c408e21a6e 16.0 landed
-
Remove redundant null pointer checks before pg_free()
- 098c703d308f 16.0 landed