mirror of https://github.com/acidanthera/audk.git
Subject: [PATCH 5/9] ShellPkg: Fix memory leak in function'ManBufferFindSections'.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19525 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dd17e3feb7
commit
4afbcc112b
|
@ -215,6 +215,7 @@ ManBufferFindSections(
|
|||
SectionLen = StrLen(SectionName);
|
||||
SectionName = StrStr(Sections, SectionName);
|
||||
if (SectionName == NULL) {
|
||||
SHELL_FREE_NON_NULL(TempString);
|
||||
continue;
|
||||
}
|
||||
if (*(SectionName + SectionLen) == CHAR_NULL || *(SectionName + SectionLen) == L',') {
|
||||
|
@ -250,6 +251,7 @@ ManBufferFindSections(
|
|||
}
|
||||
SHELL_FREE_NON_NULL(TempString);
|
||||
}
|
||||
SHELL_FREE_NON_NULL(TempString);
|
||||
if (!Found && !EFI_ERROR(Status)) {
|
||||
return (EFI_NOT_FOUND);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue