X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FCommon%2FParseGuidedSectionTools.c;h=115cfa41439f7b0b6cebe510ef6f45ef5d30c320;hp=fc8f488f7e46e646c30a62b6e9a305bcc7c90077;hb=aee346514d224a90622fe4cc553ba8ae79fe2828;hpb=5e85fb52d0838b15eb8787d08be27b4f9c3f964a diff --git a/BaseTools/Source/C/Common/ParseGuidedSectionTools.c b/BaseTools/Source/C/Common/ParseGuidedSectionTools.c index fc8f488f7e..115cfa4143 100644 --- a/BaseTools/Source/C/Common/ParseGuidedSectionTools.c +++ b/BaseTools/Source/C/Common/ParseGuidedSectionTools.c @@ -125,10 +125,12 @@ Returns: Status = StripInfDscStringInPlace (NextLine); if (EFI_ERROR (Status)) { + free (NextLine); break; } if (NextLine[0] == '\0') { + free (NextLine); continue; } @@ -153,8 +155,12 @@ Returns: LastGuidTool = NewGuidTool; } } + } + + if (Tool != NULL) { FreeStringList (Tool); } + free (NextLine); } return FirstGuidTool;