From fc085f7f1860cb864aa61bb3f248a970565a9055 Mon Sep 17 00:00:00 2001 From: Gustavo Luiz Duarte Date: Tue, 17 Sep 2019 17:44:58 +0200 Subject: [PATCH] net: Fix crash on http Don't free file->data on receiving FIN flag since it is used all over without checking. http_close() will be called later to free that memory. Fixes bug: https://bugzilla.redhat.com/show_bug.cgi?id=860834 Signed-off-by: Gustavo Luiz Duarte Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Kiper --- grub-core/net/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/net/http.c b/grub-core/net/http.c index 5aa4ad3be..ec3647f9a 100644 --- a/grub-core/net/http.c +++ b/grub-core/net/http.c @@ -392,7 +392,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) data->sock = grub_net_tcp_open (file->device->net->server, HTTP_PORT, http_receive, - http_err, http_err, + http_err, NULL, file); if (!data->sock) {