dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0161-Revert-efinet-memory-leak-on-module-removal.patch

ecb9bb
From 41772bb7633fab5e38f0dac90e1e04538a066a3d Mon Sep 17 00:00:00 2001
ecb9bb
From: Andrei Borzenkov <arvidjaar@gmail.com>
ecb9bb
Date: Mon, 4 May 2015 09:13:53 +0300
27a4da
Subject: [PATCH 161/260] Revert "efinet: memory leak on module removal"
ecb9bb
ecb9bb
This reverts commits 47b2bee3ef0ea60fc3f5bfc37f3784e559385297
ecb9bb
and 8d3c4544ffdd0289a4b0bdeb0cdc6355f801a4b3. It is not safe
ecb9bb
to free allocated cards, dangling pointers main remain. Such
ecb9bb
cleanup requires more changes in net core.
ecb9bb
---
ecb9bb
 grub-core/net/drivers/efi/efinet.c | 8 +-------
ecb9bb
 1 file changed, 1 insertion(+), 7 deletions(-)
ecb9bb
ecb9bb
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
27a4da
index bb863e65a..78df215be 100644
ecb9bb
--- a/grub-core/net/drivers/efi/efinet.c
ecb9bb
+++ b/grub-core/net/drivers/efi/efinet.c
ecb9bb
@@ -294,12 +294,6 @@ GRUB_MOD_FINI(efinet)
ecb9bb
 
ecb9bb
   FOR_NET_CARDS_SAFE (card, next) 
ecb9bb
     if (card->driver == &efidriver)
ecb9bb
-      {
ecb9bb
-	grub_net_card_unregister (card);
ecb9bb
-	grub_free (card->txbuf);
ecb9bb
-	grub_free (card->rcvbuf);
ecb9bb
-	grub_free ((char *)card->name);
ecb9bb
-	grub_free (card);
ecb9bb
-      }
ecb9bb
+      grub_net_card_unregister (card);
ecb9bb
 }
ecb9bb
 
ecb9bb
-- 
27a4da
2.13.0
ecb9bb