[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/14] net: don't free uninitialized sockets in dns
From: |
Andrei Borzenkov |
Subject: |
Re: [PATCH 05/14] net: don't free uninitialized sockets in dns |
Date: |
Sat, 13 Feb 2016 20:59:53 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
11.02.2016 00:20, Josef Bacik пишет:
> If we cannot open a connection to our dns server we will have NULL sockets in
> our array, so don't do the cleanup on any sockets that didn't get created.
>
Was not it already fixed by
commit a01ab69848257a3df705e524c4acafe795e05cc9
Author: Andrei Borzenkov <address@hidden>
Date: Mon Oct 12 23:16:23 2015 +0300
net: avoid closing NULL socket in DNS lookup
Refactor code so that we do not store NULL pointers in array
of in-flight DNS servers.
Reported-By: Josef Bacik <address@hidden>
> Signed-off-by: Josef Bacik <address@hidden>
> ---
> grub-core/net/dns.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
> index 89741dd..82a3307 100644
> --- a/grub-core/net/dns.c
> +++ b/grub-core/net/dns.c
> @@ -598,7 +598,10 @@ grub_net_dns_lookup (const char *name,
> grub_free (data.name);
> grub_netbuff_free (nb);
> for (j = 0; j < send_servers; j++)
> - grub_net_udp_close (sockets[j]);
> + {
> + if (sockets[j])
> + grub_net_udp_close (sockets[j]);
> + }
>
> grub_free (sockets);
>
>
- [PATCH 10/14] dns: poll card between each dns request, (continued)
- [PATCH 12/14] icmp6: use default interface as the route interface, Josef Bacik, 2016/02/10
- [PATCH 04/14] tcp: add window scaling and RTTM support, Josef Bacik, 2016/02/10
- [PATCH 01/14] Added net_bootp6 command, Josef Bacik, 2016/02/10
- [PATCH 02/14] UEFI IPv6 PXE support, Josef Bacik, 2016/02/10
- [PATCH 05/14] net: don't free uninitialized sockets in dns, Josef Bacik, 2016/02/10
- Re: [PATCH 05/14] net: don't free uninitialized sockets in dns,
Andrei Borzenkov <=
- [PATCH 07/14] efinet: retransmit if our device is busy, Josef Bacik, 2016/02/10
- [PATCH 03/14] Use UEFI MAC device as default configured by net_bootp6, Josef Bacik, 2016/02/10
- [PATCH 14/14] net: add interfaces when we open a card, Josef Bacik, 2016/02/10
- [PATCH 06/14] net: fix ipv6 routing, Josef Bacik, 2016/02/10