do_mount(): fix one time, fsname size memory leak

master
szaka 2008-03-23 14:09:35 +00:00
parent ca890bec0a
commit 6d8f003336
1 changed files with 6 additions and 7 deletions

View File

@ -489,17 +489,16 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
*typep = type;
*mnt_optsp = mnt_opts;
}
free(optbuf);
return res;
err:
out:
free(fsname);
free(optbuf);
return res;
err:
free(source);
free(type);
free(mnt_opts);
free(optbuf);
return -1;
res = -1;
goto out;
}
static int check_perm(const char **mntp, struct stat *stbuf, int *currdir_fd,