瀏覽代碼

[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>
tags/v0.9.8
Joshua Oreman 15 年之前
父節點
當前提交
fc9750a68d
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. 1
    2
      src/net/80211/net80211.c

+ 1
- 2
src/net/80211/net80211.c 查看文件

1521
 		DBGC ( ctx->dev, "802.11 %p probe: found nothing for '%s'\n",
1521
 		DBGC ( ctx->dev, "802.11 %p probe: found nothing for '%s'\n",
1522
 		       ctx->dev, ctx->essid );
1522
 		       ctx->dev, ctx->essid );
1523
 
1523
 
1524
-	if ( ! list_empty ( ctx->beacons ) )
1525
-		net80211_free_wlanlist ( ctx->beacons );
1524
+	net80211_free_wlanlist ( ctx->beacons );
1526
 
1525
 
1527
 	net80211_keep_mgmt ( ctx->dev, ctx->old_keep_mgmt );
1526
 	net80211_keep_mgmt ( ctx->dev, ctx->old_keep_mgmt );
1528
 
1527
 

Loading…
取消
儲存