aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Oreman <oremanj@rwcr.net>2009-08-06 16:20:57 -0700
committerMichael Brown <mcb30@etherboot.org>2009-08-09 00:12:53 +0100
commitfc9750a68d405480b5da0e8989836ba91a62b855 (patch)
tree0f05653d96a382f9a07da3b7f30a344deefa9e93
parent0b3c88e03520ac2663a70b8365341b727b2e67a2 (diff)
downloadipxe-fc9750a68d405480b5da0e8989836ba91a62b855.zip
ipxe-fc9750a68d405480b5da0e8989836ba91a62b855.tar.gz
ipxe-fc9750a68d405480b5da0e8989836ba91a62b855.tar.bz2
[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>
-rw-r--r--src/net/80211/net80211.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/80211/net80211.c b/src/net/80211/net80211.c
index 1b2ffd3..c46870c 100644
--- a/src/net/80211/net80211.c
+++ b/src/net/80211/net80211.c
@@ -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 );