Fix potential leak in mkdir_fs error path

This commit is contained in:
Peter Harliman Liem 2016-11-10 23:02:00 +08:00 committed by Kevin Lange
parent 6542587c8c
commit 6073d23abe

View File

@ -331,6 +331,8 @@ int mkdir_fs(char *name, uint16_t permission) {
if (this) {
debug_print(ERROR, "Tried to mkdir a dir that already exists? (%s)", path);
close_fs(this);
free(path);
free(parent_path);
return -EEXIST;
}