From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Josef Bacik <jbacik@fb.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>, kernel-team@fb.com
Subject: Re: [PATCH] net: don't free uninitialized sockets in dns
Date: Sat, 10 Oct 2015 10:03:56 +0300 [thread overview]
Message-ID: <5618B85C.4080603@gmail.com> (raw)
In-Reply-To: <55D4B0A5.9060101@gmail.com>
ping?
19.08.2015 19:36, Andrei Borzenkov пишет:
> 18.08.2015 21:03, 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.
>>
>
> We can avoid having holes to start with. Could you test attached patch?
>
>> Signed-off-by: Josef Bacik <jbacik@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 9d0c8fc..c356318 100644
>> --- a/grub-core/net/dns.c
>> +++ b/grub-core/net/dns.c
>> @@ -601,7 +601,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);
>>
>>
>
next prev parent reply other threads:[~2015-10-10 11:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 18:03 [PATCH] net: don't free uninitialized sockets in dns Josef Bacik
2015-08-19 16:36 ` Andrei Borzenkov
2015-10-10 7:03 ` Andrei Borzenkov [this message]
2015-10-12 15:02 ` Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5618B85C.4080603@gmail.com \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=jbacik@fb.com \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).