mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 11:13:29 +00:00
Fix for bug #20177. Make sure string is set if GetSpec() fails inside http logging code.
This commit is contained in:
parent
693e0c8f67
commit
3dfff899f2
@ -1238,9 +1238,12 @@ nsresult nsHTTPChannel::Redirect(const char *aNewLocation,
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
char *newURLSpec;
|
||||
nsresult log_rv;
|
||||
|
||||
newURLSpec = nsnull;
|
||||
newURI->GetSpec(&newURLSpec);
|
||||
log_rv = newURI->GetSpec(&newURLSpec);
|
||||
if (NS_FAILED(log_rv))
|
||||
newURLSpec = nsCRT::strdup("?");
|
||||
PR_LOG(gHTTPLog, PR_LOG_ALWAYS,
|
||||
("ProcessRedirect [this=%x].\tRedirecting to: %s.\n",
|
||||
this, newURLSpec));
|
||||
|
Loading…
Reference in New Issue
Block a user