mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-25 10:47:47 +02:00
ImageTool: Fix memory leaks
This commit is contained in:
parent
ca23202d18
commit
6a22eca730
@ -171,6 +171,7 @@ ConstructHii (
|
||||
File = UserReadFile (FileNames[Index], &FileSize);
|
||||
if (File == NULL) {
|
||||
fprintf (stderr, "ImageTool: Could not open %s: %s\n", FileNames[Index], strerror (errno));
|
||||
free (HiiPackageData);
|
||||
return RETURN_ABORTED;
|
||||
}
|
||||
|
||||
|
@ -109,6 +109,7 @@ HiiSrc (
|
||||
" (CONST MODULE_HII_PACKAGE_LIST *)&mModuleHiiPackageList;\n"
|
||||
);
|
||||
|
||||
fclose (FilePtr);
|
||||
FreePool (Hii);
|
||||
|
||||
return RETURN_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user