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

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: Andrei Borzenkov <arvidjaar@gmail.com>
f731ee
Date: Mon, 4 May 2015 08:08:57 +0300
f731ee
Subject: [PATCH] efinet: memory leak on module removal
f731ee
f731ee
---
f731ee
 grub-core/net/drivers/efi/efinet.c | 8 +++++++-
f731ee
 1 file changed, 7 insertions(+), 1 deletion(-)
f731ee
f731ee
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
f731ee
index 78df215be12..810adf38fe6 100644
f731ee
--- a/grub-core/net/drivers/efi/efinet.c
f731ee
+++ b/grub-core/net/drivers/efi/efinet.c
f731ee
@@ -294,6 +294,12 @@ GRUB_MOD_FINI(efinet)
f731ee
 
f731ee
   FOR_NET_CARDS_SAFE (card, next) 
f731ee
     if (card->driver == &efidriver)
f731ee
-      grub_net_card_unregister (card);
f731ee
+      {
f731ee
+	grub_net_card_unregister (card);
f731ee
+	grub_free (card->txbuf);
f731ee
+	grub_free (card->rcvbuf);
f731ee
+	grub_free (card->name);
f731ee
+	grub_free (card);
f731ee
+      }
f731ee
 }
f731ee