[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] [PATCH] Bug #40908
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] [PATCH] Bug #40908 |
Date: |
Sat, 04 Jan 2014 14:42:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hi Håkon,
thanks for your contribution, I have a few comments:
Håkon Vågsether <address@hidden> writes:
> From dd9370f6362650a1f1a2b38577a87776da020547 Mon Sep 17 00:00:00 2001
> From: H¥kon V¥gsether <address@hidden>
> Date: Sun, 29 Dec 2013 13:27:18 +0100
> Subject: [PATCH] Fixed bug #40908
please use a description of the fix itself in the subject, you can link
to the bug in the commit body though (and that is welcome).
> diff --git a/src/http.c b/src/http.c
> index 754b7ec..e5dcd3c 100644
> --- a/src/http.c
> +++ b/src/http.c
> @@ -3043,7 +3043,10 @@ http_loop (struct url *u, struct url *original_url,
> char **newloc,
>
> /* Send preliminary HEAD request if -N is given and we have an existing
> * destination file. */
> - file_name = url_file_name (opt.trustservernames ? u : original_url, NULL);
> + if (!opt.output_document)
> + file_name = url_file_name (opt.trustservernames ? u : original_url,
> NULL);
> + else
> + file_name = opt.output_document;
`file_name' is freed a few lines below, so to ensure you are not freeing
`opt.output_document', you should use:
+ file_name = xstrdup (opt.output_document);
Cheers,
Giuseppe
- Re: [Bug-wget] [PATCH] Bug #40908,
Giuseppe Scrivano <=