tipc: unlock in error path
authorInsu Yun <wuninsu@gmail.com>
Wed, 17 Feb 2016 16:47:35 +0000 (11:47 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Feb 2016 20:38:44 +0000 (15:38 -0500)
tipc_bcast_unlock need to be unlocked in error path.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c

index 0c2944fb9ae0d34ca8e153d9412c5896b47ffacf..347cdc99ed094ab8326071b69958296641576198 100644 (file)
@@ -1973,8 +1973,10 @@ int tipc_nl_add_bc_link(struct net *net, struct tipc_nl_msg *msg)
 
        hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
                          NLM_F_MULTI, TIPC_NL_LINK_GET);
-       if (!hdr)
+       if (!hdr) {
+               tipc_bcast_unlock(net);
                return -EMSGSIZE;
+       }
 
        attrs = nla_nest_start(msg->skb, TIPC_NLA_LINK);
        if (!attrs)
This page took 0.027444 seconds and 5 git commands to generate.