We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9a973c commit b42f226Copy full SHA for b42f226
1 file changed
lib/vssh/libssh.c
@@ -1137,14 +1137,13 @@ static int myssh_in_UPLOAD_INIT(struct Curl_easy *data,
1137
attrs = sftp_stat(sshc->sftp_session, sshp->path);
1138
if(attrs) {
1139
curl_off_t size = attrs->size;
1140
+ sftp_attributes_free(attrs);
1141
if(size < 0) {
1142
failf(data, "Bad file size (%" FMT_OFF_T ")", size);
1143
rc = myssh_to_ERROR(data, sshc, CURLE_BAD_DOWNLOAD_RESUME);
1144
return rc;
1145
}
- data->state.resume_from = attrs->size;
1146
-
1147
- sftp_attributes_free(attrs);
+ data->state.resume_from = size;
1148
1149
else {
1150
data->state.resume_from = 0;
0 commit comments