nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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