diff options
author | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2020-01-30 18:07:17 +0100 |
---|---|---|
committer | Anderson Toshiyuki Sasaki <ansasaki@redhat.com> | 2020-02-24 19:30:35 +0100 |
commit | 89194e0d3ae3a05b8eca832df5c00ea5f130e237 (patch) | |
tree | 1010d3dad33ee54231b303239ff46b47be86e799 /tests/torture.c | |
parent | 35224092ebd45679e233252b8e36ffcf94fb285d (diff) | |
download | libssh-89194e0d3ae3a05b8eca832df5c00ea5f130e237.tar.gz libssh-89194e0d3ae3a05b8eca832df5c00ea5f130e237.tar.xz libssh-89194e0d3ae3a05b8eca832df5c00ea5f130e237.zip |
tests: Do not leave temporary SFTP directory
The temporary directory created in torture_sftp_session() wouldn't be
removed. This removes such directory in torture_sftp_close().
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'tests/torture.c')
-rw-r--r-- | tests/torture.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/torture.c b/tests/torture.c index 05d9a991..652421e9 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -475,6 +475,10 @@ void torture_sftp_close(struct torture_sftp *t) { sftp_free(t->sftp); } + if (t->testdir) { + torture_rmdirs(t->testdir); + } + free(t->testdir); free(t); } |