mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-29 13:01:13 +03:00
example: Fix a use after free in the scp example
CID: #1032343 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -229,6 +229,7 @@ static int do_copy(struct location *src, struct location *dest, int recursive){
|
||||
fprintf(stderr,"error: %s\n",ssh_get_error(dest->session));
|
||||
ssh_string_free_char(filename);
|
||||
ssh_scp_free(dest->scp);
|
||||
dest->scp = NULL;
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user