|
Hi. I think I may have found a memory leak’s cause
in the LDAP routines.
The ldap_first_entry routine is reusing the
variable ‘result’, which was previously assigned on ldap_search_st, so any of
the ldap_msgfree later calls will not pass the original value, as it
should.
If this is the problem, using a second (LDAPMessage
*) variable for the entry-retrieving calls, should do it.
Just as an example, check this code fragment:
if ((result = ldap_first_entry(ld_inst, result)) == NULL)
{
ldap_msgfree(result); return 0; } It is wrong, because you are always passing NULL to ldap_msgfree instead of
the original value returned from ldap_first_entry
It should be:
if ((another_ptLDAPMessage_variable = ldap_first_entry(ld_inst, result)) ==
NULL) {
ldap_msgfree(result); return 0; } Hope this helps,
---
Juan R. Marchionatto System Engineer RR Enterprises |
- (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Dan Perik
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP aland
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Matthew S. Crocker
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP aland
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Matthew S. Crocker
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Juan Marchionatto
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP aland
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Juan Marchionatto
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP aland
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Juan Marchionatto
- RE: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Peter Foreman
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Juan Marchionatto
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP John Morrissey
- RE: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Peter Foreman
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP John Morrissey
- Re: (Freeradius 0.1 vs. Freeradius 0.2) + LDAP Juan Marchionatto
