mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
NetworkPkg/HttpDxe: Fix missing error check in TlsCommonTransmit
In HttpsReceive(), the return value of TlsCommonTransmit() was not checked. Add error handling with proper cleanup of PacketOut and BufferOut before returning on failure. Cc: Saloni Kasbekar <saloni.kasbekar@intel.com> Cc: Zachary Clark-williams <zachary.clark-williams@intel.com> Signed-off-by: abuthahirm <abuthahirm@ami.com>
This commit is contained in:
parent
a90f2a0d9a
commit
1f28f1e819
1 changed files with 5 additions and 0 deletions
|
|
@ -1909,6 +1909,11 @@ HttpsReceive (
|
|||
CopyMem (DataOut, BufferOut, BufferOutSize);
|
||||
|
||||
Status = TlsCommonTransmit (HttpInstance, PacketOut);
|
||||
if (EFI_ERROR (Status)) {
|
||||
NetbufFree (PacketOut);
|
||||
FreePool (BufferOut);
|
||||
return Status;
|
||||
}
|
||||
|
||||
NetbufFree (PacketOut);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue