Skip to content

Commit

Permalink
BaseTools/GenSec: Fix potential memory leak
Browse files Browse the repository at this point in the history
Cc: Yonghong Zhu <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
  • Loading branch information
hwu25 committed Dec 25, 2017
1 parent 33fc1fc commit ae0fbb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion BaseTools/Source/C/GenSec/GenSec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,11 @@ Routine Description:
if (OutFile != NULL) {
fclose (OutFile);
}


if (DummyFileBuffer != NULL) {
free (DummyFileBuffer);
}

VerboseMsg ("%s tool done with return code is 0x%x.", UTILITY_NAME, GetUtilityStatus ());

return GetUtilityStatus ();
Expand Down

0 comments on commit ae0fbb7

Please sign in to comment.