Commit c63d6ea3060d9e10773e869b1112e3a0efbcf820
Committed by
David S. Miller
1 parent
59deab26c1
Exists in
master
and in
38 other branches
rtnetlink: unlock on error path in netlink_dump()
In c7ac8679bec939 "rtnetlink: Compute and store minimum ifinfo dump size", we moved the allocation under the lock so we need to unlock on error path. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
net/netlink/af_netlink.c
... | ... | @@ -1676,7 +1676,7 @@ |
1676 | 1676 | |
1677 | 1677 | skb = sock_rmalloc(sk, alloc_size, 0, GFP_KERNEL); |
1678 | 1678 | if (!skb) |
1679 | - goto errout; | |
1679 | + goto errout_skb; | |
1680 | 1680 | |
1681 | 1681 | len = cb->dump(skb, cb); |
1682 | 1682 | |
... | ... | @@ -1716,7 +1716,6 @@ |
1716 | 1716 | errout_skb: |
1717 | 1717 | mutex_unlock(nlk->cb_mutex); |
1718 | 1718 | kfree_skb(skb); |
1719 | -errout: | |
1720 | 1719 | return err; |
1721 | 1720 | } |
1722 | 1721 |