mirror of https://github.com/acidanthera/audk.git
Fix bug in PXE driver: memory may be freed before use.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14354 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d7bb8de9b9
commit
3d2367a2a7
|
@ -1353,9 +1353,6 @@ ON_ERROR:
|
|||
&gEfiCallerIdGuid,
|
||||
&Private->Id
|
||||
);
|
||||
if (Private != NULL) {
|
||||
FreePool (Private);
|
||||
}
|
||||
}
|
||||
|
||||
if (IpVersion == IP_VERSION_4) {
|
||||
|
@ -1364,6 +1361,10 @@ ON_ERROR:
|
|||
PxeBcDestroyIp6Children (This, Private);
|
||||
}
|
||||
|
||||
if (FirstStart && Private != NULL) {
|
||||
FreePool (Private);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue