Avoid incorrect allocation in buildIndexArray

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Avoid incorrect allocation in buildIndexArray
Дата
Msg-id 26C43E58-BDD0-4F1A-97CC-4A07B52E32C5@yesql.se
обсуждение исходный текст
Ответы Re: Avoid incorrect allocation in buildIndexArray
Список pgsql-hackers
Looking at a pg_dump patch I realized that when we call buildIndexArray without
having found objects to index, we still call pg_malloc with zero which in turn
mallocs 1 byte.  The byte in question is of course negligable, but it does seem
cleaner to return early with NULL instead of returning an empty allocation
which doesn't actually contain an index.

Any reason not to bail early as per the attached?

cheers ./daniel






Вложения

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: TDE (Transparent Data Encryption) supported ?
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Avoid incorrect allocation in buildIndexArray