]> git.ipfire.org Git - thirdparty/grub.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)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 7 Jun 2022 14:39:33 +0000 (16:39 +0200)
commitdad94fffe14be476df5f34a8e5a90ea62a41fe12
tree328320ff659b5a2088f5ca044aceed70c2b2f007
parent8f287c3e13da2bf82049e2e464eca7ca4fef0a85
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