mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
audit: use struct_size() helper in audit_[send|make]_reply()
Make use of struct_size() helper instead of an open-coded calculation. Link: https://github.com/KSPP/linux/issues/160 Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
@@ -1092,7 +1092,7 @@ static void audit_list_rules(int seq, struct sk_buff_head *q)
|
||||
break;
|
||||
skb = audit_make_reply(seq, AUDIT_LIST_RULES, 0, 1,
|
||||
data,
|
||||
sizeof(*data) + data->buflen);
|
||||
struct_size(data, buf, data->buflen));
|
||||
if (skb)
|
||||
skb_queue_tail(q, skb);
|
||||
kfree(data);
|
||||
|
Reference in New Issue
Block a user