[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8674) Leak in ldap_create_assertion_control



Full_Name: Matt Johnson
Version: 2.4.40
OS: RedHat 7.2 (Maipo)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (15.203.233.86)


The LDAPClient::modify logic has a leak within the
    ldap_create_assertion_control method.  The leaky code occurs when the
    existing ld_errno is anything but 0 when
    the method is invoked.  Not only that, but your assertion
    returned is NULL.

The workaround is to call the following before calling
ldap_create_assertion_control.

int lvErrno = 0;
ldap_set_option(myLDAPPtr, LDAP_OPT_RESULT_CODE, &lvErrno);