git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11248
6f19259b-4bc3-4df7-8a09-
765794883524
\r
FragmentCount = Packet->BlockOpNum;
Fragment = AllocatePool (FragmentCount * sizeof (NET_FRAGMENT));
- if (Fragment == NULL) {
- return EFI_OUT_OF_RESOURCES;
+ if (Fragment == NULL) {\r
+ Status = EFI_OUT_OF_RESOURCES;\r
+ goto ON_EXIT;\r
}
//
// Build the fragment table.
} else {\r
TcpIo->RxToken.Tcp6Token.Packet.RxData = NULL;\r
}\r
-\r
- FreePool (Fragment);\r
+ \r
+ if (Fragment != NULL) {\r
+ FreePool (Fragment);\r
+ }\r
return Status;\r
}\r