Skip to content

Commit

Permalink
fou: avoid missing unlock in failure path
Browse files Browse the repository at this point in the history
Fixes: 7a6c8c3 ("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>
  • Loading branch information
WANG Cong authored and David S. Miller committed Apr 16, 2015
1 parent c3de631 commit 540207a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv4/fou.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,10 @@ static int fou_nl_dump(struct sk_buff *skb, struct netlink_callback *cb)
cb->nlh->nlmsg_seq, NLM_F_MULTI,
skb, FOU_CMD_GET);
if (ret)
goto done;
break;
}
mutex_unlock(&fn->fou_lock);

done:
cb->args[0] = idx;
return skb->len;
}
Expand Down

0 comments on commit 540207a

Please sign in to comment.