From: Bill Nagel Date: Mon, 29 Dec 2014 21:04:04 +0000 (-0500) Subject: smb: Close the connection after a failed client write X-Git-Tag: curl-7_40_0~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfa0ac7aff6dedd43294226ef683c0e44c9d7691;p=thirdparty%2Fcurl.git smb: Close the connection after a failed client write --- diff --git a/lib/smb.c b/lib/smb.c index a097c89194..2f8513384f 100644 --- a/lib/smb.c +++ b/lib/smb.c @@ -769,8 +769,11 @@ static CURLcode smb_request_state(struct connectdata *conn, bool *done) result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)msg + off + sizeof(unsigned int), len); - if(result) - return result; + if(result) { + req->result = result; + next_state = SMB_CLOSE; + break; + } } conn->data->req.bytecount += len; conn->data->req.offset += len;