linux/swconfig_get_attr: fix leak of msg in case of error
authorAlexander Couzens <lynxis@fe80.eu>
Sun, 11 Jun 2017 11:33:18 +0000 (13:33 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Sun, 11 Jun 2017 12:22:44 +0000 (14:22 +0200)
Found-by: Coverity Scan #1330102
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
target/linux/generic/files/drivers/net/phy/swconfig.c

index 63a95881361ca76bd8a5f624f48dbe9b121d62dd..f6f26e43ab98fef74f581874017827d84eebc099 100644 (file)
@@ -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;