1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

torture: Fixed memory leak.

This commit is contained in:
Andreas Schneider
2011-02-08 19:08:27 +01:00
parent 8078d4f674
commit f5e2c94ae3

View File

@ -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);