From b148591a8ce071b686aaadad398d599685f33487 Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Thu, 9 Feb 2012 15:29:35 +0000 Subject: ArmPlatformPkg/Bds: Fixed memory leak git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12997 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/Bds.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ArmPlatformPkg/Bds/Bds.c') diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index 176311e..8f7f9fd 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; -- cgit v1.1