Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[802.11] Fix memory leak on unsuccessful probes
When a probe found no results, the list head of beacons would not be
freed, leaking 16 bytes of memory per probe.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
  • Loading branch information
rwcr authored and Michael Brown committed Aug 8, 2009
1 parent 0b3c88e commit fc9750a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/net/80211/net80211.c
Expand Up @@ -1521,8 +1521,7 @@ net80211_probe_finish_best ( struct net80211_probe_ctx *ctx )
DBGC ( ctx->dev, "802.11 %p probe: found nothing for '%s'\n",
ctx->dev, ctx->essid );

if ( ! list_empty ( ctx->beacons ) )
net80211_free_wlanlist ( ctx->beacons );
net80211_free_wlanlist ( ctx->beacons );

net80211_keep_mgmt ( ctx->dev, ctx->old_keep_mgmt );

Expand Down

0 comments on commit fc9750a

Please sign in to comment.