NetworkPkg/HttpBootDxe: Avoid the potential memory leak when eror happen.
Cc: Wang Fan <fan.wang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wang Fan <fan.wang@intel.com>
This commit is contained in:
@@ -422,6 +422,9 @@ HttpBootParseDhcp4Packet (
|
||||
if (!IsProxyOffer) {
|
||||
OfferType = IsDnsOffer ? HttpOfferTypeDhcpDns : HttpOfferTypeDhcpOnly;
|
||||
} else {
|
||||
if (Cache4->UriParser != NULL) {
|
||||
FreePool (Cache4->UriParser);
|
||||
}
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user