]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/batman-adv/routing.c
batman-adv: fix potential orig_node reference leak
[karo-tx-linux.git] / net / batman-adv / routing.c
index 1ed9f7c9ecea4108f00d7beb6c2cb056f5ff87ed..c26f07368849b86bd0dacec984dcc88a59725d12 100644 (file)
@@ -688,7 +688,7 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv,
        int is_old_ttvn;
 
        /* check if there is enough data before accessing it */
-       if (pskb_may_pull(skb, hdr_len + ETH_HLEN) < 0)
+       if (!pskb_may_pull(skb, hdr_len + ETH_HLEN))
                return 0;
 
        /* create a copy of the skb (in case of for re-routing) to modify it. */