[source] linux/swconfig_get_attr: fix leak of msg in case of error

LEDE Commits lede-commits at lists.infradead.org
Sun Jun 11 05:27:48 PDT 2017


lynxis pushed a commit to source.git, branch master:
https://git.lede-project.org/878cd7702620be91175f2568f3a8225150483b0c

commit 878cd7702620be91175f2568f3a8225150483b0c
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Sun Jun 11 13:33:18 2017 +0200

    linux/swconfig_get_attr: fix leak of msg in case of error
    
    Found-by: Coverity Scan #1330102
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 target/linux/generic/files/drivers/net/phy/swconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index 63a9588..f6f26e4 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;



More information about the lede-commits mailing list