mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-06-03 14:42:01 +03:00
examples: Fix a use after free in scp example.
This commit is contained in:
parent
abd6b8004e
commit
a03d8f49fb
@ -286,7 +286,7 @@ int main(int argc, char **argv){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(dest->is_ssh){
|
||||
if (dest->is_ssh && dest->scp != NULL) {
|
||||
r=ssh_scp_close(dest->scp);
|
||||
if(r == SSH_ERROR){
|
||||
fprintf(stderr,"Error closing scp: %s\n",ssh_get_error(dest->session));
|
||||
|
Loading…
x
Reference in New Issue
Block a user