diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2015-04-15 14:48:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-16 12:11:19 -0400 |
commit | 540207ae69777b85d167df28f469e77f0fcbb8f9 (patch) | |
tree | 1b69372a41f65d3359da8c81f9ad390020b5b636 /net/ipv4/fou.c | |
parent | c3de6317d748e23b9e46ba36e10483728d00d144 (diff) |
fou: avoid missing unlock in failure path
Fixes: 7a6c8c34e5b7 ("fou: implement FOU_CMD_GET")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fou.c')
-rw-r--r-- | net/ipv4/fou.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index af150b43b214..34968cd5c146 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c | |||
@@ -711,11 +711,10 @@ static int fou_nl_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
711 | cb->nlh->nlmsg_seq, NLM_F_MULTI, | 711 | cb->nlh->nlmsg_seq, NLM_F_MULTI, |
712 | skb, FOU_CMD_GET); | 712 | skb, FOU_CMD_GET); |
713 | if (ret) | 713 | if (ret) |
714 | goto done; | 714 | break; |
715 | } | 715 | } |
716 | mutex_unlock(&fn->fou_lock); | 716 | mutex_unlock(&fn->fou_lock); |
717 | 717 | ||
718 | done: | ||
719 | cb->args[0] = idx; | 718 | cb->args[0] = idx; |
720 | return skb->len; | 719 | return skb->len; |
721 | } | 720 | } |