1
0
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:
Andreas Schneider
2015-05-05 10:36:11 +02:00
parent 7c79959e94
commit 96882cc58c

View File

@ -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 {