X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=net%2Fbatman-adv%2Fbat_v.c;h=6baec4e68898c6e992e7522d2ee8c78ce62a1b08;hb=293bccc5b202400a6e47bd42e852d50d7d991b4e;hp=ec93337ee2597738e46b87dd72724d5becf3f48e;hpb=48023102b7078a6674516b1fe0d639669336049d;p=linux-2.6-microblaze.git diff --git a/net/batman-adv/bat_v.c b/net/batman-adv/bat_v.c index ec93337ee259..6baec4e68898 100644 --- a/net/batman-adv/bat_v.c +++ b/net/batman-adv/bat_v.c @@ -927,7 +927,7 @@ static int batadv_v_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq, { struct batadv_neigh_ifinfo *router_ifinfo = NULL; struct batadv_neigh_node *router; - struct batadv_gw_node *curr_gw; + struct batadv_gw_node *curr_gw = NULL; int ret = 0; void *hdr; @@ -995,6 +995,8 @@ static int batadv_v_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq, ret = 0; out: + if (curr_gw) + batadv_gw_node_put(curr_gw); if (router_ifinfo) batadv_neigh_ifinfo_put(router_ifinfo); if (router)