dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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