On 11.01.2016 18:05, Martin Basti wrote:

On 11.01.2016 17:52, Nathaniel McCallum wrote:
On Mon, 2016-01-11 at 17:45 +0100, Martin Basti wrote:

On 14.12.2015 16:22, Nathaniel McCallum wrote:
We always have to call find_base() in order to force libldap to
the socket. However, if no base is actually required then there is
no reason to error out if find_base() fails. This condition can
when anonymous binds are disabled.


IMO this code may result into free(NULL);

     /* Always find the base since this forces open the socket. */
     basetmp = find_base(ldp);
     if (base != NULL) {
         if (basetmp == NULL)
             return ENOTCONN;
         *base = basetmp;
     } else {
         free(basetmp);  <-- here, if both base and basetmp are NULL
 From the man page for free(): "If ptr is NULL, no operation is

Sorry, my bad.


Pushed to master: 563bddce6d0c3e31f4858edb25f1260af8cc3c44

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to