On Sun, Jun 17, 2012 at 03:00:14AM +0800, Marek Lindner wrote:
On Saturday, June 16, 2012 14:27:41 Antonio Quartulli wrote:
-static bool +static void batadv_send_my_tt_response(struct batadv_priv *bat_priv, struct batadv_tt_query_packet *tt_request) { @@ -1656,7 +1656,6 @@ batadv_send_my_tt_response(struct batadv_priv *bat_priv, struct batadv_neigh_node *neigh_node = NULL; struct batadv_hard_iface *primary_if = NULL; uint8_t my_ttvn, req_ttvn, ttvn;
int ret = false; unsigned char *tt_buff; bool full_table; uint16_t tt_len, tt_tot;
@@ -1751,7 +1750,6 @@ batadv_send_my_tt_response(struct batadv_priv *bat_priv, batadv_inc_counter(bat_priv, BATADV_CNT_TT_RESPONSE_TX);
batadv_send_skb_packet(skb, neigh_node->if_incoming,
neigh_node->addr); - ret = true; goto out;
unlock: @@ -1763,10 +1761,6 @@ out: batadv_neigh_node_free_ref(neigh_node); if (primary_if) batadv_hardif_free_ref(primary_if);
if (!ret)
kfree_skb(skb);
/* This packet was for me, so it doesn't need to be re-routed */
return true;
}
Unless I am mistake you are adding a beautiful memory leak here.
You are right. I misinterpreted this skb. I'll send v4 soon!
Thank you
Regards, Marek