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 <arvidj...@gmail.com> 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 <jba...@fb.com> > Signed-off-by: Josef Bacik <jba...@fb.com> > --- > 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); > > _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel