diff options
author | David S. Miller <davem@davemloft.net> | 2012-03-29 08:41:26 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-01 22:11:37 (GMT) |
commit | 9360ffd1859720f6520cf59241909b74dae369d0 (patch) | |
tree | 4a46b772addeec8a6f81ea0ab033bf98ed593ab7 /net/wireless/wext-core.c | |
parent | d0fde795d21d6271934f132557ce9542ceb358eb (diff) | |
download | linux-9360ffd1859720f6520cf59241909b74dae369d0.tar.xz |
wireless: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/wext-core.c')
-rw-r--r-- | net/wireless/wext-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 0af7f54..9f544c9 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -402,7 +402,8 @@ static struct nlmsghdr *rtnetlink_ifinfo_prep(struct net_device *dev, r->ifi_flags = dev_get_flags(dev); r->ifi_change = 0; /* Wireless changes don't affect those flags */ - NLA_PUT_STRING(skb, IFLA_IFNAME, dev->name); + if (nla_put_string(skb, IFLA_IFNAME, dev->name)) + goto nla_put_failure; return nlh; nla_put_failure: |