[Top][All Lists]

[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: Giuseppe Scrivano
Subject: Re: [Bug-wget] [Bug-Wget] Wrong Error Codes returned on Digest Auth Failures.
Date: Mon, 22 Jul 2013 14:03:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]