]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
net: Fix crash on http
authorGustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
Tue, 17 Sep 2019 15:44:58 +0000 (17:44 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 23 Sep 2019 11:16:48 +0000 (13:16 +0200)
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 <gustavold@linux.vnet.ibm.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/http.c

index 5aa4ad3befc15ba427797c7f1454d8a322d51b2f..ec3647f9a0c273b2d0fb5b5d516ad9e15497c845 100644 (file)
@@ -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)
     {