pgsql: Fix a bunch of places that called malloc and friends with no NUL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix a bunch of places that called malloc and friends with no NUL
Дата
Msg-id E1berQh-0005Kp-0d@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix a bunch of places that called malloc and friends with no NULL check.

Where possible, use palloc or pg_malloc instead; otherwise, insert
explicit NULL checks.

Generally speaking, these are places where an actual OOM is quite
unlikely, either because they're in client programs that don't
allocate all that much, or they're very early in process startup
so that we'd likely have had a fork() failure instead.  Hence,
no back-patch, even though this is nominally a bug fix.

Michael Paquier, with some adjustments by me

Discussion: <CAB7nPqRu07Ot6iht9i9KRfYLpDaF2ZuUv5y_+72uP23ZAGysRg@mail.gmail.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/052cc223d5ce1b727f62afff75797c88d82f880b

Modified Files
--------------
contrib/pg_standby/pg_standby.c               |  2 +-
contrib/vacuumlo/vacuumlo.c                   |  8 ++---
src/backend/bootstrap/bootstrap.c             | 14 +++-----
src/backend/port/dynloader/darwin.c           |  3 ++
src/backend/utils/misc/ps_status.c            | 27 +++++++++++++++
src/bin/pg_archivecleanup/pg_archivecleanup.c |  2 +-
src/bin/psql/command.c                        | 12 +++++--
src/common/exec.c                             |  9 +++--
src/test/isolation/isolationtester.c          | 14 ++++----
src/test/isolation/specparse.y                | 34 +++++++++----------
src/test/isolation/specscanner.l              |  4 +--
src/test/regress/pg_regress.c                 | 48 +++++++++++++--------------
12 files changed, 108 insertions(+), 69 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Simplify correct use of simple_prompt().
Следующее
От: pgsql@postgresql.org
Дата:
Сообщение: pgsql: Tag refs/tags/REL9_6_RC1 was created