diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-05-05 10:36:11 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-05-05 11:27:09 +0200 |
commit | 96882cc58cc36f79600a54263b7327b1ce88f99e (patch) | |
tree | 6cfc9a8142b63e613f349abc2963743cad1eb0d1 /examples | |
parent | 7c79959e9402fc11cbfe74b7574e103d34602f6b (diff) | |
download | libssh-96882cc58cc36f79600a54263b7327b1ce88f99e.tar.gz libssh-96882cc58cc36f79600a54263b7327b1ce88f99e.tar.xz libssh-96882cc58cc36f79600a54263b7327b1ce88f99e.zip |
example: Fix a use after free in the scp example
CID: #1032343
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/libssh_scp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/libssh_scp.c b/examples/libssh_scp.c index 99281db8..46199f47 100644 --- a/examples/libssh_scp.c +++ b/examples/libssh_scp.c @@ -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 { |