Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 5735f9f

Browse files
committed
free scandir list in non file volumes case
Signed-off-by: Peng Tao <[email protected]>
1 parent de0c2c9 commit 5735f9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/container.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ static int container_check_file_volume(char *hyper_path, const char **filename)
6969
return -1;
7070
} else if (num != 3) {
7171
fprintf(stdout, "%s has %d files/dirs\n", hyper_path, num - 2);
72+
for (i = 0; i < num; i++) {
73+
free(list[i]);
74+
}
75+
free(list);
7276
return 0;
7377
}
7478

0 commit comments

Comments
 (0)