pgsql: Plug memory leak in index_get_partition

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Plug memory leak in index_get_partition
Дата
Msg-id E1kbDPm-0007GG-DG@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Plug memory leak in index_get_partition

The list of indexes was being leaked when asked for an index that
doesn't have an index partition in the table partition.  Not a common
case admittedly --and in most cases where it occurs, caller throws an
error anyway-- but worth fixing for cleanliness and in case any
third-party code is calling this function.

While at it, remove use of lfirst_oid() to obtain a value we already
have.

Author: Justin Pryzby <pryzby@telsasoft.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/20201105203606.GF22691@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/623644f02cbde7ad3812b201bd36213a206c3341

Modified Files
--------------
src/backend/catalog/partition.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add GUC_LIST_INPUT and GUC_LIST_QUOTE to unix_socket_directories
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Move catalog index declarations