aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/smb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/smb.c b/lib/smb.c
index a097c8919..2f8513384 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;