[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Fail
From: |
Darshit Shah |
Subject: |
Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures. |
Date: |
Mon, 22 Jul 2013 17:45:05 +0530 |
On Mon, Jul 22, 2013 at 5:33 PM, Giuseppe Scrivano <address@hidden>wrote:
> Darshit Shah <address@hidden> writes:
>
> > Should we xfree_null (qop) before setting it to NULL?
> >
> >
> > qop will ALWAYS be xfree'd if it is explicitly set to NULL. The if
> > statement on the next line takes care of that.
>
> sorry, I still don't understand it. Won't "xfree_null (qop)" be a NOP
> when qop is NULL?
>
> AFAICS, we can access the memory pointed by qop only trough the qop
> pointer itself, if we set qop to NULL then we have lost access to the
> memory.
>
> Please note that xfree_null is defined in utils.h as:
>
> #define xfree_null(p) if (!(p)) ; else xfree (p)
>
>
>
> > In the original code, we set user to NULL while it was xfree'd only at
> > termination time.
>
> The original code was leaking memory, so please don't take it as an
> example :-) digest_authentication_encode doesn't allocate "user", so in
> any case digest_authentication_encode is not the right place to free it.
>
> Right. My bad. I assumed that the original code was perfect and went along
with it.
I set xfree_null(qop) in both the places, however, I now encounter a
SIGSEGV at log.c:450.
I'll debug it and see what I can do.
--
Thanking You,
Darshit Shah
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., (continued)
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Darshit Shah, 2013/07/14
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Darshit Shah, 2013/07/14
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Tim Rühsen, 2013/07/15
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Darshit Shah, 2013/07/16
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Tim Rühsen, 2013/07/16
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Darshit Shah, 2013/07/17
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Tim Rühsen, 2013/07/18
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Giuseppe Scrivano, 2013/07/21
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Darshit Shah, 2013/07/22
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Giuseppe Scrivano, 2013/07/22
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures.,
Darshit Shah <=
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Darshit Shah, 2013/07/22
- Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures., Giuseppe Scrivano, 2013/07/22