freeing LDAPMessage in CheckLDAPAuth

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема freeing LDAPMessage in CheckLDAPAuth
Дата
Msg-id CALNJ-vTf5Y+8RtzZ4GjOGE9qWVHZ8awfhnFYc_qGm8fMLUNRAg@mail.gmail.com
обсуждение исходный текст
Ответы Re: freeing LDAPMessage in CheckLDAPAuth  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,
In CheckLDAPAuth(), around line 2606:

        if (r != LDAP_SUCCESS)
        {
            ereport(LOG,
                    (errmsg("could not search LDAP for filter \"%s\" on server \"%s\": %s",

It seems that the call to ldap_msgfree() is missing in the above case.
       Note  that  res  parameter  of  ldap_search_ext_s() and ldap_search_s()       should be freed with ldap_msgfree() regardless of return value of these       functions.
Please see the attached patch which frees the search_message in the above case.

Thanks
Вложения

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Fix typo function circle_same (src/backend/utils/adt/geo_ops.c)
Следующее
От: John Naylor
Дата:
Сообщение: Re: warning: comparison of integer expressions of different signedness related to simd.h