nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
ecb9bb
From: Andrei Borzenkov <arvidjaar@gmail.com>
ecb9bb
Date: Mon, 4 May 2015 08:08:57 +0300
28f7f8
Subject: [PATCH] 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
28f7f8
index 78df215be12..810adf38fe6 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