fix cleanup

This commit is contained in:
Ryo Nakamura
2023-03-12 17:06:02 +09:00
parent 1028ecb53b
commit 2416b5f182
2 changed files with 8 additions and 4 deletions

View File

@@ -571,6 +571,11 @@ static void free_chunk(struct list_head *list)
void mscp_cleanup(struct mscp *m)
{
if (m->first) {
ssh_sftp_close(m->first);
m->first = NULL;
}
release_list(&m->src_list, free_src);
INIT_LIST_HEAD(&m->src_list);