[PATCH] wget: release the globals struct memory pointed by ptr_to_globals.

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Mar 21 22:06:13 UTC 2013


On 21 March 2013 20:14:04 Guilherme Maciel Ferreira 
<guilherme.maciel.ferreira at gmail.com> wrote:
> Hi,

> >> +#if ENABLE_FEATURE_WGET_LONG_OPTIONS
> >> +       if (ENABLE_FEATURE_CLEAN_UP && G.extra_headers) {
> >
> >
> > The idea behind these ENABLE defines was to increase preprocessor coverage.
> > You should likely move the condition from CPP to c.
>
> I not sure if I understood exactly what you mean here. Did you mean to
> add the ENABLE_FEATURE_CLEAN_UP to the preprocessor condition, like
> this:
>
> #if ENABLE_FEATURE_WGET_LONG_OPTIONS && ENABLE_FEATURE_CLEAN_UP
> 	if (G.extra_headers) {
> 		free(G.extra_headers);
> 	}
> #endif

No, the other way round:
>
> or, on the other hand, by the second sentence I understood you meant
> to do not use the preprocessor:
>
> if (ENABLE_FEATURE_WGET_LONG_OPTIONS && ENABLE_FEATURE_CLEAN_UP &&
> G.extra_headers) {
> 	free(G.extra_headers);
> }

Exactly. Sorry that I wasn't clear.
TIA,


Sent with AquaMail for Android
http://www.aqua-mail.com




More information about the busybox mailing list