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

memory leaks



First off, thanks for all of the help everyone has already given with my
other questions.


Just to double check.  Could someone confirm that my following assumptions
are correct.

The definitions or below.

ld needs to be freed with ldap_unbind(ld);
result needs to be freed with ldap_msgfree(result);
e does *not* need to be freed!
attr does *not* need to be freed!
vals needs to be freed with ldap_value_free(vals);
ber needs to be freed with ber_free(ber);


LDAP		*ld	=(LDAP*)NULL;			/* ldap handle  */

LDAPMessage	*result	=(LDAPMessage*)NULL;	/* set by ldap_search_st()
*/
LDAPMessage	*e	=(LDAPMessage*)NULL;		/* returned from
ldap_first_entry() */


char		*attr	=(char*)NULL;			/* returned from
lpad_first_attribute() */
char		**vals	=(char**)NULL;		/* returned from
ldap_get_values() */
BerElement	*ber	=(BerElement*)NULL;		/* set by
ldap_first_attribute()


Thanks in advance,
-Ash

-------------------------
Ashley Neal Hornbeck
Splitrock Services, Inc.
281.465.1318