Browse Source

linux/swconfig_get_attr: fix leak of msg in case of error

Found-by: Coverity Scan #1330102
Signed-off-by: Alexander Couzens <[email protected]>
Alexander Couzens 8 years ago
parent
commit
878cd77026
1 changed files with 1 additions and 1 deletions
  1. 1 1
      target/linux/generic/files/drivers/net/phy/swconfig.c

+ 1 - 1
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;