aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-02-08 19:08:27 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-02-08 19:08:27 +0100
commitf5e2c94ae33fda1313a154d415de730c0600ea7b (patch)
treea13305dd525073caab74a971229fa0a6791e56f6
parent8078d4f674f311e31af68e8d87f6ba2755f13ece (diff)
downloadlibssh-f5e2c94ae33fda1313a154d415de730c0600ea7b.tar.gz
libssh-f5e2c94ae33fda1313a154d415de730c0600ea7b.tar.xz
libssh-f5e2c94ae33fda1313a154d415de730c0600ea7b.zip
torture: Fixed memory leak.
-rw-r--r--tests/torture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/torture.c b/tests/torture.c
index 9c61ed2..e24ef44 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -226,7 +226,7 @@ struct torture_sftp *torture_sftp_session(ssh_session session) {
return NULL;
}
- t = malloc(sizeof(struct torture_sftp *));
+ t = malloc(sizeof(struct torture_sftp));
if (t == NULL) {
return NULL;
}
@@ -275,6 +275,7 @@ void torture_sftp_close(struct torture_sftp *t) {
if (ssh_is_connected(t->ssh)) {
ssh_disconnect(t->ssh);
}
+ ssh_free(t->ssh);
}
free(t->testdir);