Avoid resource leak (src/test/regress/pg_regress.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Avoid resource leak (src/test/regress/pg_regress.c)
Дата
Msg-id CAEudQAquegvX32h5OL1Z1t8yn5wa2FAOhL5RMTqBer8ppzB4UA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Avoid resource leak (src/test/regress/pg_regress.c)
Список pgsql-hackers
Hi.

Per Coverity.

The function *config_sspi_auth* is responsible for 
rewrite pg_hba.conf and pg_ident.conf to use SSPI authentication.

Coverity complains that the struct addrinfo gai_result is leaked.
The variable is declared inside block and is not used
outside the block.

So if the function WSAStartup is successful then the function getaddrinfo
allocates and fills the struct addrinfo.

The memory must be released at the end of the block.

Trivial patch attached.

best regards,
Ranier Vilela
Вложения

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