aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-05-05 10:36:11 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-05-05 11:27:09 +0200
commit96882cc58cc36f79600a54263b7327b1ce88f99e (patch)
tree6cfc9a8142b63e613f349abc2963743cad1eb0d1
parent7c79959e9402fc11cbfe74b7574e103d34602f6b (diff)
downloadlibssh-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>
-rw-r--r--examples/libssh_scp.c1
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 {