Full_Name: Kuldeep Khare Version: 2.3.31 OS: Qnx URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (61.247.254.226)
Hi,
I am getting memory leak when calling below openldap api. I am using openldap-2.3.31 version.
if(ldap_init()) { ldap_configure_client(mSession,clientip); int ldap_version = 3; ldap_set_option(mSession, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); ldap_set_option(mSession, LDAP_OPT_PROTOCOL_VERSION, &ldap_version);
// set timeout for every complete search ldap_set_option(mSession, LDAP_OPT_TIMELIMIT, &SMA_CERT_LDAP_SEARCH_TIMEOUT);
// set timeout for any api call
struct timeval api_timeout; api_timeout.tv_sec = SMA_CERT_LDAP_API_TIMEOUT; api_timeout.tv_usec = 0;
struct timeval net_timeout; net_timeout.tv_sec = SMA_CERT_LDAP_NET_TIMEOUT; net_timeout.tv_usec = 0;
ldap_set_option(mSession, LDAP_OPT_TIMEOUT, &api_timeout); ldap_set_option(mSession, LDAP_OPT_NETWORK_TIMEOUT, &net_timeout); }
ldap_simple_bind(); //Only if init is successful ldap_result(); //only if init is successful ldap_unbind();
If anyone has encountered this issue please help.
Thanks, Kuldeep