Skip to content

Commit

Permalink
ntlm_wb_response: fix "statement not reached"
Browse files Browse the repository at this point in the history
... and I could use a break instead of a goto to end the loop.

Bug: http://curl.haxx.se/mail/lib-2014-12/0089.html
Reported-by: Tor Arntsen
  • Loading branch information
bagder committed Dec 10, 2014
1 parent 8ff3bb5 commit f4b5f8c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/curl_ntlm_wb.c
Expand Up @@ -294,7 +294,7 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,
len_out += size;
if(buf[len_out - 1] == '\n') {
buf[len_out - 1] = '\0';
goto wrfinish;
break;
}
newbuf = realloc(buf, len_out + NTLM_BUFSIZE);
if(!newbuf) {
Expand All @@ -303,8 +303,7 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,
}
buf = newbuf;
}
goto done;
wrfinish:

/* Samba/winbind installed but not configured */
if(state == NTLMSTATE_TYPE1 &&
len_out == 3 &&
Expand Down

0 comments on commit f4b5f8c

Please sign in to comment.