dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
ecb9bb
From 8471c374d9379ba80e4b3bbcacb4813a2d04f008 Mon Sep 17 00:00:00 2001
ecb9bb
From: Andrei Borzenkov <arvidjaar@gmail.com>
ecb9bb
Date: Mon, 4 May 2015 08:08:57 +0300
27a4da
Subject: [PATCH 159/260] efinet: memory leak on module removal
ecb9bb
ecb9bb
---
ecb9bb
 grub-core/net/drivers/efi/efinet.c | 8 +++++++-
ecb9bb
 1 file changed, 7 insertions(+), 1 deletion(-)
ecb9bb
ecb9bb
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
27a4da
index 78df215be..810adf38f 100644
ecb9bb
--- a/grub-core/net/drivers/efi/efinet.c
ecb9bb
+++ b/grub-core/net/drivers/efi/efinet.c
ecb9bb
@@ -294,6 +294,12 @@ GRUB_MOD_FINI(efinet)
ecb9bb
 
ecb9bb
   FOR_NET_CARDS_SAFE (card, next) 
ecb9bb
     if (card->driver == &efidriver)
ecb9bb
-      grub_net_card_unregister (card);
ecb9bb
+      {
ecb9bb
+	grub_net_card_unregister (card);
ecb9bb
+	grub_free (card->txbuf);
ecb9bb
+	grub_free (card->rcvbuf);
ecb9bb
+	grub_free (card->name);
ecb9bb
+	grub_free (card);
ecb9bb
+      }
ecb9bb
 }
ecb9bb
 
ecb9bb
-- 
27a4da
2.13.0
ecb9bb