diff options
author | Bing Luo <robin.luo@jaguarmicro.com> | 2024-12-29 10:20:31 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-12-31 23:26:19 +0000 |
commit | 070eadb55037c4c897aecbcc442186e723e8b40d (patch) | |
tree | 1dc41eff138b1aa51cf24a9ddea57da22ab4e94d | |
parent | a2263cb2011db5c18530701a9bdb057f846f6d4f (diff) | |
download | edk2-070eadb55037c4c897aecbcc442186e723e8b40d.tar.gz |
NetworkPkg/UefiPxeBcDxe: Bugfix for pxe driver
Ensure the poniter is not null before free it
Signed-off-by: Bing Luo <robin.luo@jaguarmicro.com>
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c index 4cd915b411..92f097277c 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c @@ -246,7 +246,9 @@ PxeBcDestroyIp4Children ( &Private->PxeBc,
NULL
);
- FreePool (Private->Ip4Nic->DevicePath);
+ if (Private->Ip4Nic->DevicePath != NULL) {
+ FreePool (Private->Ip4Nic->DevicePath);
+ }
if (Private->Snp != NULL) {
//
@@ -407,7 +409,9 @@ PxeBcDestroyIp6Children ( &Private->PxeBc,
NULL
);
- FreePool (Private->Ip6Nic->DevicePath);
+ if (Private->Ip6Nic->DevicePath != NULL) {
+ FreePool (Private->Ip6Nic->DevicePath);
+ }
if (Private->Snp != NULL) {
//
|