mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-22 10:01:03 +00:00
linux/swconfig_get_attr: fix leak of msg in case of error
Found-by: Coverity Scan #1330102 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
parent
814e1695aa
commit
878cd77026
@ -893,7 +893,7 @@ swconfig_get_attr(struct sk_buff *skb, struct genl_info *info)
|
|||||||
default:
|
default:
|
||||||
pr_debug("invalid type in attribute\n");
|
pr_debug("invalid type in attribute\n");
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto error;
|
goto nla_put_failure;
|
||||||
}
|
}
|
||||||
genlmsg_end(msg, hdr);
|
genlmsg_end(msg, hdr);
|
||||||
err = msg->len;
|
err = msg->len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user