HomeFreeBSD

Fix zfs_unmount() and zfs_unshare_proto() leaks

Description

Fix zfs_unmount() and zfs_unshare_proto() leaks

Always free mnpt memory on failure in the zfs_unmount() function.

In the zfs_unshare_proto() function mountpoint is a const and
should not be assigned.

Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5054

Details

Provenance
cao <cao.xuewen@zte.com.cn>Authored on Aug 31 2016, 10:35 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 1 2016, 6:39 PM
Parents
rGee36c709c3d5: Performance optimization of AVL tree comparator functions
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG2d96d7aa56ea: Fix zfs_unmount() and zfs_unshare_proto() leaks (authored by cao <cao.xuewen@zte.com.cn>).Sep 1 2016, 6:39 PM