mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Fix two memory leaks in error conditions involving the UFS ACL code:
if failures occur, make sure that we release both the default ACL and access ACL storage during new object creation. Spotted by: phk and his pet flexelint Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
a6b9f47b31
commit
baeb8a4774
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105123
@ -1480,6 +1480,8 @@ ufs_mkdir(ap)
|
||||
default:
|
||||
UFS_VFREE(tvp, ip->i_number, dmode);
|
||||
vput(tvp);
|
||||
FREE(acl, M_ACL);
|
||||
FREE(dacl, M_ACL);
|
||||
return (error);
|
||||
}
|
||||
#else /* !UFS_ACL */
|
||||
@ -2381,6 +2383,8 @@ ufs_makeinode(mode, dvp, vpp, cnp)
|
||||
default:
|
||||
UFS_VFREE(tvp, ip->i_number, mode);
|
||||
vput(tvp);
|
||||
FREE(acl, M_ACL);
|
||||
acl = NULL;
|
||||
return (error);
|
||||
}
|
||||
#else /* !UFS_ACL */
|
||||
|
Loading…
Reference in New Issue
Block a user