* src/retr.c (retrieve_url): NULL check mynewloc

Reported-by: Coverity
This commit is contained in:
Tim Rühsen 2016-09-08 12:46:23 +02:00
parent b4465afa8a
commit 22aed3ed4b

View File

@ -869,7 +869,7 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
redirects, but a ton of boneheaded webservers and CGIs out redirects, but a ton of boneheaded webservers and CGIs out
there break the rules and use relative URLs, and popular there break the rules and use relative URLs, and popular
browsers are lenient about this, so wget should be too. */ browsers are lenient about this, so wget should be too. */
construced_newloc = uri_merge (url, mynewloc); construced_newloc = uri_merge (url, mynewloc ? mynewloc : "");
xfree (mynewloc); xfree (mynewloc);
mynewloc = construced_newloc; mynewloc = construced_newloc;