Re: freeing LDAPMessage in CheckLDAPAuth

Zhihong Yu <zyu@yugabyte.com>

From: Zhihong Yu <zyu@yugabyte.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-05T09:50:09Z
Lists: pgsql-hackers

Attachments

On Sun, Sep 4, 2022 at 10:37 PM Michael Paquier <michael@paquier.xyz> wrote:

> On Sun, Sep 04, 2022 at 06:52:37AM -0700, Zhihong Yu wrote:
> > Please take a look at patch v3.
>
> Fine as far as it goes.  I would have put the initialization of
> search_message closer to ldap_search_s() for consistency with libpq.
> That's what we do with ldap_search_st().
> --
> Michael
>
Hi,
Here is patch v4.

Commits

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