summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
authorLiming Gao <gaoliming@byosoft.com.cn>2021-11-26 00:11:06 +0800
committerLiming Gao <gaoliming@byosoft.com.cn>2021-11-26 16:54:49 +0800
commitbb1bba3d776733c41dbfa2d1dc0fe234819a79f2 (patch)
tree95c99e98b4eb86948d0639c3f4679e903abf1507 /NetworkPkg
parent4c7ce0d285bc7fd593718fd5dec02e136cbfad8e (diff)
downloadedk2-bb1bba3d776733c41dbfa2d1dc0fe234819a79f2.tar.gz
edk2-bb1bba3d776733c41dbfa2d1dc0fe234819a79f2.tar.bz2
edk2-bb1bba3d776733c41dbfa2d1dc0fe234819a79f2.zip
NetworkPkg: Fix invalid pointer for DNS response token on erroredk2-stable202111
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3719 This issue is introduced by the commit 43d7e607. Token->RspData.H2AData is de-allocated on error but it is not set to NULL. HTTP module attempts to free again and cause assert. Signed-off-by: Baraneedharan Anbazhagan <anbazhagan@hp.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/DnsDxe/DnsImpl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
index 2edcb280ac..78a56f2b56 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.c
+++ b/NetworkPkg/DnsDxe/DnsImpl.c
@@ -1700,6 +1700,7 @@ ON_EXIT:
}
FreePool (Dns4TokenEntry->Token->RspData.H2AData);
+ Dns4TokenEntry->Token->RspData.H2AData = NULL;
}
}
}
@@ -1731,6 +1732,7 @@ ON_EXIT:
}
FreePool (Dns6TokenEntry->Token->RspData.H2AData);
+ Dns6TokenEntry->Token->RspData.H2AData = NULL;
}
}
}