On 14.12.2015 16:22, Nathaniel McCallum wrote:
We always have to call find_base() in order to force libldap to open
the socket. However, if no base is actually required then there is
no reason to error out if find_base() fails. This condition can arise
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

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

Reply via email to