diff --git a/lib/http.c b/lib/http.c
index 0922b9eda3666783b36251933d89d6f282708f82..0c81752d3c970eb3f5379bb90e6d47924a35acb9 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -399,6 +399,7 @@ CURLcode Curl_http_auth(struct connectdata *conn,
       if (neg == 0) {
         conn->newurl = strdup(data->change.url);
         data->state.authproblem = (conn->newurl == NULL);
+      }
       else {
         infof(data, "Authentication problem. Ignoring this.\n");
         data->state.authproblem = TRUE;