fou: avoid missing unlock in failure path
authorWANG Cong <xiyou.wangcong@gmail.com>
Wed, 15 Apr 2015 18:48:49 +0000 (11:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Apr 2015 16:11:19 +0000 (12:11 -0400)
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>
net/ipv4/fou.c

index af150b43b214123b052c43ec7e40449af3d7ecd2..34968cd5c1464bf896ba1a2130fc223c50973499 100644 (file)
@@ -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;
 }