From: Alexander Couzens Date: Sun, 11 Jun 2017 11:33:18 +0000 (+0200) Subject: linux/swconfig_get_attr: fix leak of msg in case of error X-Git-Tag: v18.06.0-rc1~2714 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=878cd7702620be91175f2568f3a8225150483b0c;p=oweals%2Fopenwrt.git linux/swconfig_get_attr: fix leak of msg in case of error Found-by: Coverity Scan #1330102 Signed-off-by: Alexander Couzens --- diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 63a9588136..f6f26e43ab 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -893,7 +893,7 @@ swconfig_get_attr(struct sk_buff *skb, struct genl_info *info) default: pr_debug("invalid type in attribute\n"); err = -EINVAL; - goto error; + goto nla_put_failure; } genlmsg_end(msg, hdr); err = msg->len;