dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0095-Fix-crash-on-http.patch

4fe85b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4fe85b
From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
4fe85b
Date: Tue, 25 Sep 2012 18:40:55 -0400
4fe85b
Subject: [PATCH] Fix crash on http
4fe85b
4fe85b
Don't free file->data on receiving FIN flag since it is used all over without
4fe85b
checking. http_close() will be called later to free that memory.
4fe85b
https://bugzilla.redhat.com/show_bug.cgi?id=860834
4fe85b
---
4fe85b
 grub-core/net/http.c | 2 +-
4fe85b
 1 file changed, 1 insertion(+), 1 deletion(-)
4fe85b
4fe85b
diff --git a/grub-core/net/http.c b/grub-core/net/http.c
4fe85b
index 4684f8b333c..ef9538c539c 100644
4fe85b
--- a/grub-core/net/http.c
4fe85b
+++ b/grub-core/net/http.c
4fe85b
@@ -393,7 +393,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)
4fe85b
 
4fe85b
   data->sock = grub_net_tcp_open (file->device->net->server,
4fe85b
 				  HTTP_PORT, http_receive,
4fe85b
-				  http_err, http_err,
4fe85b
+				  http_err, NULL,
4fe85b
 				  file);
4fe85b
   if (!data->sock)
4fe85b
     {