diff options
author | Liming Gao <gaoliming@byosoft.com.cn> | 2021-11-26 00:11:06 +0800 |
---|---|---|
committer | Liming Gao <gaoliming@byosoft.com.cn> | 2021-11-26 16:54:49 +0800 |
commit | bb1bba3d776733c41dbfa2d1dc0fe234819a79f2 (patch) | |
tree | 95c99e98b4eb86948d0639c3f4679e903abf1507 /NetworkPkg/DnsDxe | |
parent | 4c7ce0d285bc7fd593718fd5dec02e136cbfad8e (diff) | |
download | edk2-bb1bba3d776733c41dbfa2d1dc0fe234819a79f2.zip edk2-bb1bba3d776733c41dbfa2d1dc0fe234819a79f2.tar.gz edk2-bb1bba3d776733c41dbfa2d1dc0fe234819a79f2.tar.bz2 |
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/DnsDxe')
-rw-r--r-- | NetworkPkg/DnsDxe/DnsImpl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c index 2edcb28..78a56f2 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;
}
}
}
|