NetworkPkg/HttpDxe: Fix the potential NULL dereference
Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Hao A <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
@@ -591,10 +591,12 @@ EfiHttpRequest (
|
||||
|
||||
Status = HttpGenRequestMessage (HttpMsg, FileUrl, &RequestMsg, &RequestMsgSize);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR (Status) || NULL == RequestMsg) {
|
||||
goto Error3;
|
||||
}
|
||||
|
||||
ASSERT (RequestMsg != NULL);
|
||||
|
||||
//
|
||||
// Every request we insert a TxToken and a response call would remove the TxToken.
|
||||
// In cases of PUT/POST, after an initial request-response pair, we would do a
|
||||
|
Reference in New Issue
Block a user