tipc: fix return value check in tipc_mcast_send_sync()
authorWei Yongjun <[email protected]>
Mon, 25 Mar 2019 06:31:09 +0000 (06:31 +0000)
committerDavid S. Miller <[email protected]>
Tue, 26 Mar 2019 18:39:37 +0000 (11:39 -0700)
Fix the return value check which testing the wrong variable
in tipc_mcast_send_sync().

Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Jon Maloy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/tipc/bcast.c

index 88edfb358ae7a05e06e6eb191587b329294c0818..76e14dc08bb9fc23dbb2358d4559b97966f35818 100644 (file)
@@ -329,7 +329,7 @@ static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb,
 
        /* Allocate dummy message */
        _skb = tipc_buf_acquire(MCAST_H_SIZE, GFP_KERNEL);
-       if (!skb)
+       if (!_skb)
                return -ENOMEM;
 
        /* Preparing for 'synching' header */