Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153056691
D10974.id28943.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
861 B
Referenced Files
None
Subscribers
None
D10974.id28943.diff
View Options
Index: sys/fs/ext2fs/ext2_acl.c
===================================================================
--- sys/fs/ext2fs/ext2_acl.c
+++ sys/fs/ext2fs/ext2_acl.c
@@ -210,11 +210,6 @@
int len;
int error;
- len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header);
- value = malloc(len, M_ACL, M_WAITOK);
- if (!value)
- return (ENOMEM);
-
switch (ap->a_type) {
case ACL_TYPE_DEFAULT:
attrnamespace = POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE;
@@ -228,6 +223,11 @@
return (EINVAL);
}
+ len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header);
+ value = malloc(len, M_ACL, M_WAITOK);
+ if (!value)
+ return (ENOMEM);
+
error = vn_extattr_get(ap->a_vp, IO_NODELOCKED, attrnamespace, attrname,
&len, value, ap->a_td);
switch (error) {
@@ -518,4 +518,4 @@
}
return (acl_posix1e_check(ap->a_aclp));
-}
\ No newline at end of file
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 19, 9:29 PM (1 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31799877
Default Alt Text
D10974.id28943.diff (861 B)
Attached To
Mode
D10974: Fix memory leak in case of incorrect ACL type
Attached
Detach File
Event Timeline
Log In to Comment