Skip to content

Commit

Permalink
RedfishClientPkg: fix memory leak
Browse files Browse the repository at this point in the history
This patch fixes leak in RedfishExternalResourceResourceFeatureCallback
function.

Signed-off-by: Mike Maslenkin <[email protected]>
  • Loading branch information
ghbaccount committed Sep 28, 2023
1 parent d456b6b commit ed43335
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ RedfishExternalResourceResourceFeatureCallback (
Private->Uri = RedfishGetUri (ResourceUri);
if (Private->Uri == NULL) {
ASSERT (FALSE);
FreePool (ResourceUri);
return EFI_OUT_OF_RESOURCES;
}

Expand All @@ -727,6 +728,7 @@ RedfishExternalResourceResourceFeatureCallback (
}

FreePool (Private->Uri);
FreePool (ResourceUri);
return Status;
}

Expand Down

0 comments on commit ed43335

Please sign in to comment.