From: Joshua Oreman Date: Thu, 6 Aug 2009 23:20:57 +0000 (-0700) Subject: [802.11] Fix memory leak on unsuccessful probes X-Git-Tag: v0.9.8~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc9750a68d405480b5da0e8989836ba91a62b855;p=thirdparty%2Fipxe.git [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 --- diff --git a/src/net/80211/net80211.c b/src/net/80211/net80211.c index 1b2ffd385..c46870c4e 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 );