]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
batman-adv: check skb preparation return value
authorAntonio Quartulli <antonio@meshcoding.com>
Sat, 19 Oct 2013 12:06:05 +0000 (14:06 +0200)
committerAntonio Quartulli <antonio@meshcoding.com>
Sat, 19 Oct 2013 12:46:32 +0000 (14:46 +0200)
Fix bogus merge conflict resolution by checking the return
values of the skb preparation routines.

Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
net/batman-adv/send.c

index 82588e425641cbc739e270e7d1e2e1013189e24f..d765d53f82011475631abdfae3d29bfae1fac3a1 100644 (file)
@@ -267,11 +267,14 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv,
 
        switch (packet_type) {
        case BATADV_UNICAST:
-               batadv_send_skb_prepare_unicast(skb, orig_node);
+               if (!batadv_send_skb_prepare_unicast(skb, orig_node))
+                       goto out;
                break;
        case BATADV_UNICAST_4ADDR:
-               batadv_send_skb_prepare_unicast_4addr(bat_priv, skb, orig_node,
-                                                     packet_subtype);
+               if (!batadv_send_skb_prepare_unicast_4addr(bat_priv, skb,
+                                                          orig_node,
+                                                          packet_subtype))
+                       goto out;
                break;
        default:
                /* this function supports UNICAST and UNICAST_4ADDR only. It