]> git.proxmox.com Git - grub2.git/commit
net/http: Do not tear down socket if it's already been torn down
authorDaniel Axtens <dja@axtens.net>
Tue, 1 Mar 2022 12:14:15 +0000 (23:14 +1100)
committerJulian Andres Klode <julian.klode@canonical.com>
Wed, 8 Jun 2022 10:41:03 +0000 (12:41 +0200)
commit6df718714dea5043243e367750b5c6abebcf79fe
treed6503bf3d5bc214274475b51c899f62ccacf5de2
parentfb66f40ba67b88408a43cb38492053985bfe4968
net/http: Do not tear down socket if it's already been torn down

It's possible for data->sock to get torn down in tcp error handling.
If we unconditionally tear it down again we will end up doing writes
to an offset of the NULL pointer when we go to tear it down again.

Detect if it has been torn down and don't do it again.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/http.c