From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Zhang, Lubo" <lubo.zhang@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>, "Wu, Jiaxin" <jiaxin.wu@intel.com>
Subject: Re: [patch] NetworkPkg: Enhance the code in DNS driver.
Date: Mon, 17 Oct 2016 09:06:11 +0000 [thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58A82DB74@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1476428061-23960-1-git-send-email-lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan siyuan.fu@intel.com
> -----Original Message-----
> From: Zhang, Lubo
> Sent: Friday, October 14, 2016 2:54 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu,
> Jiaxin <jiaxin.wu@intel.com>
> Subject: [patch] NetworkPkg: Enhance the code in DNS driver.
>
> There may be an error happens when we use the
> configure function to set or change the configuration
> data for the DNS6 instance, So we will free the
> DnsServerList without configured to NULL. If we reset
> the instance with the parameter DnsConfigData to NULL, the
> DnsServerList will be freed twice.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
> NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c
> b/NetworkPkg/DnsDxe/DnsProtocol.c
> index 64fca6a..6d117b2 100644
> --- a/NetworkPkg/DnsDxe/DnsProtocol.c
> +++ b/NetworkPkg/DnsDxe/DnsProtocol.c
> @@ -285,10 +285,11 @@ Dns4Configure (
> //
> Status = Dns4ConfigUdp (Instance, Instance->UdpIo);
> if (EFI_ERROR (Status)) {
> if (Instance->Dns4CfgData.DnsServerList != NULL) {
> FreePool (Instance->Dns4CfgData.DnsServerList);
> + Instance->Dns4CfgData.DnsServerList = NULL;
> }
> goto ON_EXIT;
> }
>
> //
> @@ -296,10 +297,11 @@ Dns4Configure (
> //
> Status = AddDns4ServerIp (&mDriverData->Dns4ServerList, Instance-
> >SessionDnsServer.v4);
> if (EFI_ERROR (Status)) {
> if (Instance->Dns4CfgData.DnsServerList != NULL) {
> FreePool (Instance->Dns4CfgData.DnsServerList);
> + Instance->Dns4CfgData.DnsServerList = NULL;
> }
> goto ON_EXIT;
> }
>
> Instance->State = DNS_STATE_CONFIGED;
> @@ -1106,10 +1108,11 @@ Dns6Configure (
> //
> Status = Dns6ConfigUdp (Instance, Instance->UdpIo);
> if (EFI_ERROR (Status)) {
> if (Instance->Dns6CfgData.DnsServerList != NULL) {
> FreePool (Instance->Dns6CfgData.DnsServerList);
> + Instance->Dns6CfgData.DnsServerList = NULL;
> }
> goto ON_EXIT;
> }
>
> //
> @@ -1117,10 +1120,11 @@ Dns6Configure (
> //
> Status = AddDns6ServerIp (&mDriverData->Dns6ServerList, Instance-
> >SessionDnsServer.v6);
> if (EFI_ERROR (Status)) {
> if (Instance->Dns6CfgData.DnsServerList != NULL) {
> FreePool (Instance->Dns6CfgData.DnsServerList);
> + Instance->Dns6CfgData.DnsServerList = NULL;
> }
> goto ON_EXIT;
> }
>
> Instance->State = DNS_STATE_CONFIGED;
> --
> 1.9.5.msysgit.1
prev parent reply other threads:[~2016-10-17 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 6:54 [patch] NetworkPkg: Enhance the code in DNS driver Zhang Lubo
2016-10-14 12:12 ` Laszlo Ersek
2016-10-17 9:06 ` Fu, Siyuan [this message]
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-list 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=B1FF2E9001CE9041BD10B825821D5BC58A82DB74@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/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