Skip to content

Commit

Permalink
Merge pull request torvalds#119 from ngkaho1234/fix-fuse-call-seq
Browse files Browse the repository at this point in the history
lklfuse: fix fuse routines calling sequence.
  • Loading branch information
Octavian Purdila committed Mar 9, 2016
2 parents ba2e263 + 4db2ab5 commit d70d692
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/lkl/lklfuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ int main(int argc, char **argv)
goto out_fuse_unmount;
}

fuse_opt_free_args(&args);

if (fuse_daemonize(fg) ||
fuse_set_signal_handlers(fuse_get_session(fuse))) {
ret = -1;
Expand All @@ -627,11 +629,13 @@ int main(int argc, char **argv)
out_remove_signals:
fuse_remove_signal_handlers(fuse_get_session(fuse));

out_fuse_destroy:
fuse_destroy(fuse);

out_fuse_unmount:
fuse_unmount(mnt, ch);
if (ch)
fuse_unmount(mnt, ch);

out_fuse_destroy:
if (fuse)
fuse_destroy(fuse);

out_close_disk:
close(lklfuse.disk.fd);
Expand Down

0 comments on commit d70d692

Please sign in to comment.