--------------------- PatchSet 1193 Date: 2001/01/08 06:43:09 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: fix a crash in splay_tree on aclDestroy Members: src/acl.c:1.1.1.3.12.26.2.28->1.1.1.3.12.26.2.29 Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.28 retrieving revision 1.1.1.3.12.26.2.29 diff -u -r1.1.1.3.12.26.2.28 -r1.1.1.3.12.26.2.29 --- squid/src/acl.c 8 Jan 2001 00:14:56 -0000 1.1.1.3.12.26.2.28 +++ squid/src/acl.c 8 Jan 2001 06:43:09 -0000 1.1.1.3.12.26.2.29 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.26.2.28 2001/01/08 00:14:56 hno Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.29 2001/01/08 06:43:09 rbcollins Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -641,12 +641,17 @@ acl_user_data *data; splayNode *Top = NULL; - debug(28, 2) ("aclParseUserList: parsing authlist\n"); + debug(28, 2) ("aclParseUserList: parsing user list\n"); if (*current == NULL) { debug(28, 3) ("aclParseUserList: current is null. Creating\n"); - *current = memAllocate(MEM_ACL_USER_DATA); /*we rely on mA. zeroing */ + *current = memAllocate(MEM_ACL_USER_DATA); + data = *current; + data->names=NULL; + data->flags.case_insensitive=0; + data->flags.required=0; } data = *current; + Top = data->names; if ((t = strtokFile())) { debug(28, 5) ("aclParseUserList: First token is %s\n", t); if (strcmp("-i", t) == 0) { @@ -665,7 +670,7 @@ data->flags.case_insensitive); /* we might inherit from a previous declaration */ - debug(28, 4) ("aclParseUserList: parsing proxy-auth list\n"); + debug(28, 4) ("aclParseUserList: parsing user list\n"); while ((t = strtokFile())) { debug(28, 6) ("aclParseUserList: Got token: %s\n", t); if (data->flags.case_insensitive) @@ -2040,7 +2045,8 @@ aclFreeUserData(void *data) { acl_user_data *d = data; - splay_destroy(d->names, xfree); + if (d->names) + splay_destroy(d->names, xfree); memFree(d, MEM_ACL_USER_DATA); }