Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a45c873b authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: memset smsg to avoid the padding data"

parents fbe3428e f4bcb74b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ static struct netlink_kernel_cfg nlcfg = {

static void _sockev_event(unsigned long event, __u8 *evstr, int buflen)
{
	memset(evstr, 0, buflen);

	switch (event) {
	case SOCKEV_SOCKET:
@@ -99,6 +98,7 @@ static int sockev_client_cb(struct notifier_block *nb,
	NETLINK_CB(skb).dst_group = SKNLGRP_SOCKEV;

	smsg = nlmsg_data(nlh);
	memset(smsg, 0, sizeof(struct sknlsockevmsg));
	smsg->pid = current->pid;
	_sockev_event(event, smsg->event, sizeof(smsg->event));
	smsg->skfamily = sk->sk_family;