Thanks for you patch, but this bug seems to no longer exist.
squid_ldap_auth.c was quite heavily rewritten some months ago. See the
nightly Squid-2.4 snapshot.
If you find any leaks in the current squid_ldap_auth.c code, please let
me know.
--
Henrik Nordstrom
Squid Hacker
MARA Systems AB
Sweden
Sean Burford wrote:
>
> Hi,
>
> The LDAP authentication module distributed with Squid up to at least
> version 2.4 leaks memory. The attached patch fixes this problem.
>
> I have also attached the script that I used to test this module for
> memory leaks under Linux.
>
> --
> Sean
>
> ---------------------------------------------------------------
> *** squid-2.4.STABLE1/auth_modules/LDAP/squid_ldap_auth.c.orig Mon Jul 16 17:15:18 2001
> --- squid-2.4.STABLE1/auth_modules/LDAP/squid_ldap_auth.c Mon Jul 16 17:18:12 2001
> ***************
> *** 68,84 ****
> if ((user = strtok(buf, " ")) == NULL)
> {
> printf("ERR\n");
> continue;
> }
> if ((passwd = strtok(NULL, "")) == NULL)
> {
> printf("ERR\n");
> continue;
> }
> if(checkLDAP(ld, user, passwd) != 0)
> {
> printf("ERR\n");
> - continue;
> }
> else
> {
> --- 68,85 ----
> if ((user = strtok(buf, " ")) == NULL)
> {
> printf("ERR\n");
> + ldap_unbind(ld);
> continue;
> }
> if ((passwd = strtok(NULL, "")) == NULL)
> {
> printf("ERR\n");
> + ldap_unbind(ld);
> continue;
> }
> if(checkLDAP(ld, user, passwd) != 0)
> {
> printf("ERR\n");
> }
> else
> {
>
> ---------------------------------------------------------------
>
> Name: testmem.pl
> Part 1.3 Type: Perl Program (application/x-perl)
> Encoding: 7bit
Received on Mon Jul 16 2001 - 06:58:58 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:07 MST