From: Gustavo Luiz Duarte Date: Tue, 17 Sep 2019 15:44:58 +0000 (+0200) Subject: net: Fix crash on http X-Git-Tag: grub-2.06-rc1~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc085f7f1860cb864aa61bb3f248a970565a9055;p=thirdparty%2Fgrub.git 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 --- 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) {