Nice to see you around again ;-)
This you shouldn't need to do at all.. memPoolAlloc returns zeroed memory..
Data returned by memPoolAlloc is only unclean if the entry has been
(incorrecly) used after free or other kinds of memory corruption.
Regards
Henrik
Robert Collins wrote:
> Update of /cvsroot/squid/squid/src
> In directory usw-pr-cvs1:/tmp/cvs-serv29708/src
>
> Modified Files:
> Tag: ntlm
> authenticate.c
> Log Message:
> ensure a zero struct
>
> Index: authenticate.c
> ===================================================================
> RCS file: /cvsroot/squid/squid/src/authenticate.c,v
> retrieving revision 1.1.1.3.12.57
> retrieving revision 1.1.1.3.12.58
> diff -w -u -r1.1.1.3.12.57 -r1.1.1.3.12.58
> --- authenticate.c 28 Nov 2001 07:27:56 -0000 1.1.1.3.12.57
> +++ authenticate.c 12 Jun 2002 09:56:13 -0000 1.1.1.3.12.58
> @@ -197,9 +197,7 @@
> auth_user_request_pool = memPoolCreate("Authenticate Request Data",
> sizeof(auth_user_request_t)); temp_request =
> memPoolAlloc(auth_user_request_pool);
> assert(temp_request != NULL);
> - temp_request->auth_user = NULL;
> - temp_request->message = NULL;
> - temp_request->scheme_data = NULL;
> + memset(temp_request, '\0', sizeof(auth_user_request_t));
> temp_request->references = 0;
> return temp_request;
> }
>
>
> _______________________________________________________________
>
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> Squid-cvs mailing list
> http://squid.sourceforge.net/projects.html
Received on Wed Jun 12 2002 - 11:49:33 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:40 MST