Fix use after free in zfsctl_snapshot_unmount()
This commit is contained in:
parent
42dae6d7a6
commit
d71db895a1
|
@ -1032,10 +1032,10 @@ zfsctl_snapshot_unmount(char *snapname, int flags)
|
||||||
|
|
||||||
argv[2] = kmem_asprintf(SET_UNMOUNT_CMD,
|
argv[2] = kmem_asprintf(SET_UNMOUNT_CMD,
|
||||||
flags & MNT_FORCE ? "-f " : "", se->se_path);
|
flags & MNT_FORCE ? "-f " : "", se->se_path);
|
||||||
zfsctl_snapshot_rele(se);
|
|
||||||
dprintf("unmount; path=%s\n", se->se_path);
|
dprintf("unmount; path=%s\n", se->se_path);
|
||||||
error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
|
||||||
strfree(argv[2]);
|
strfree(argv[2]);
|
||||||
|
zfsctl_snapshot_rele(se);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue