pgsql: Free correctly LDAPMessage returned by ldap_search_s() in auth.c

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Free correctly LDAPMessage returned by ldap_search_s() in auth.c
Дата
Msg-id E1oWvNi-002GP5-MB@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Free correctly LDAPMessage returned by ldap_search_s() in auth.c

The LDAP wiki states that the search message should be freed regardless
of the return value of ldap_search_s(), but we failed to do so in one
backend code path when searching LDAP with a filter.  This is not
critical in an authentication code path failing in the backend as this
causes such the process to exit promptly, but let's be clean and free
the search message appropriately, as documented by upstream.

All the other code paths failing a LDAP operation do that already, and
somebody looking at this code in the future may miss what LDAP expects
with the search message.

Author: Zhihong Yu
Discussion: https://postgr.es/m/CALNJ-vTf5Y+8RtzZ4GjOGE9qWVHZ8awfhnFYc_qGm8fMLUNRAg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/799437e0bd3259c90d26e195894b6e22eb0b325c

Modified Files
--------------
src/backend/libpq/auth.c | 3 +++
1 file changed, 3 insertions(+)


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pgsql: Fix perltidy breaking perlcritic
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: aix: No need to use mkldexport when we want to export all symbol