free scandir list in non file volumes case

Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
Peng Tao
2016-08-14 13:54:06 +08:00
parent de0c2c97e4
commit 5735f9f674
+4
View File
@@ -69,6 +69,10 @@ static int container_check_file_volume(char *hyper_path, const char **filename)
return -1;
} else if (num != 3) {
fprintf(stdout, "%s has %d files/dirs\n", hyper_path, num - 2);
for (i = 0; i < num; i++) {
free(list[i]);
}
free(list);
return 0;
}