summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds/Bds.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-09 15:29:35 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-09 15:29:35 +0000
commitb148591a8ce071b686aaadad398d599685f33487 (patch)
tree5c6e97fe9d718e2251134e5a34a5127de3770d2d /ArmPlatformPkg/Bds/Bds.c
parent3d565dd6740ba4ca7428811589484c5baef0db8a (diff)
downloadedk2-platforms-b148591a8ce071b686aaadad398d599685f33487.tar.xz
ArmPlatformPkg/Bds: Fixed memory leak
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12997 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/Bds.c')
-rw-r--r--ArmPlatformPkg/Bds/Bds.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index 176311e8a2..8f7f9fdf7c 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -196,6 +196,17 @@ InitializeConsole (
gST->StdErr = gST->ConOut;
}
+ // Free Memory allocated for reading the UEFI Variables
+ if (ConOutDevicePaths) {
+ FreePool (ConOutDevicePaths);
+ }
+ if (ConInDevicePaths) {
+ FreePool (ConInDevicePaths);
+ }
+ if (ConErrDevicePaths) {
+ FreePool (ConErrDevicePaths);
+ }
+
return EFI_SUCCESS;
}
@@ -344,6 +355,7 @@ StartDefaultBootOnTimeout (
}
// In case of success, we should not return from this call.
}
+ FreePool (BootOrder);
}
}
return EFI_SUCCESS;