aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-06-11 13:33:18 +0200
committerAlexander Couzens <lynxis@fe80.eu>2017-06-11 14:22:44 +0200
commit878cd7702620be91175f2568f3a8225150483b0c (patch)
tree8ae0007dad2775abbaaf17985e9472e59a54ac0b
parent814e1695aa3e2c2cb29e27f66e925a813defee03 (diff)
downloadupstream-878cd7702620be91175f2568f3a8225150483b0c.tar.gz
upstream-878cd7702620be91175f2568f3a8225150483b0c.tar.bz2
upstream-878cd7702620be91175f2568f3a8225150483b0c.zip
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>
-rw-r--r--target/linux/generic/files/drivers/net/phy/swconfig.c2
1 files changed, 1 insertions, 1 deletions
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;