aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/strip.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-08-29 21:18:45 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-08-29 21:22:19 -0700
commitee1377c3eef4238d89b2f99fa4d0bbbad3078b64 (patch)
tree629ac8232edb57ff2831b7801d1f426835adbfdd /drivers/net/wireless/strip.c
parent57f5f544f58ffa1d6c38630d0522c9c0be67c533 (diff)
[STRIP]: Fix neighbour table refcount leak.
Found by inspection. The STRIP driver does neigh_lookup() but never releases. This driver shouldn't being doing gratuitous arp anyway. Untested, obviously, because of lack of hardware. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/strip.c')
-rw-r--r--drivers/net/wireless/strip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index fd31885c684..ccaf28e8db0 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -467,6 +467,7 @@ static int arp_query(unsigned char *haddr, u32 paddr,
struct net_device *dev)
{
struct neighbour *neighbor_entry;
+ int ret = 0;
neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev);
@@ -474,10 +475,11 @@ static int arp_query(unsigned char *haddr, u32 paddr,
neighbor_entry->used = jiffies;
if (neighbor_entry->nud_state & NUD_VALID) {
memcpy(haddr, neighbor_entry->ha, dev->addr_len);
- return 1;
+ ret = 1;
}
+ neigh_release(neighbor_entry);
}
- return 0;
+ return ret;
}
static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr,