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

Commit b644f6bb authored by Yuanyuan Liu's avatar Yuanyuan Liu Committed by Gerrit - the friendly Code Review server
Browse files

cnss2: Do not free genl skb buffer inside function after genlmsg_multicast



Do not free genl skb buffer inside function after genlmsg_multicast
as it will be freed by system.

Change-Id: I5f9809ecd47936d751ddb3f7ceb15169cd5ad56c
Signed-off-by: default avatarYuanyuan Liu <yuanliu@codeaurora.org>
parent 14888d1f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -152,11 +152,11 @@ static int cnss_genl_send_data(u8 type, char *file_name, u32 total_size,
	genlmsg_end(skb, msg_header);
	ret = genlmsg_multicast(&cnss_genl_family, skb, 0, 0, GFP_KERNEL);
	if (ret < 0)
		goto fail;
		cnss_pr_err("Fail to send genl msg: %d\n", ret);

	return ret;
fail:
	cnss_pr_err("genl msg send fail: %d\n", ret);
	cnss_pr_err("Fail to generate genl msg: %d\n", ret);
	if (skb)
		nlmsg_free(skb);
	return ret;