sqfs_closedir() should be called to free memory allocated by
sqfs_opendir()
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
[jh80.chung: cherry picked from mainline commit
7ce9745cbeae7733a7068f19a7fc3ec8f21dc38c]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I200f764bb6ce2bb828e2217d1b0f949e1db14597
if (ret) {
printf("File not found.\n");
*actread = 0;
- sqfs_closedir(dirsp);
ret = -ENOENT;
goto free_paths;
}
free_paths:
free(file);
free(dir);
+ sqfs_closedir(dirsp);
return ret;
}