ArmPlatformPkg: Fixed memory leak after calling GetEnvironmentVariable()
authorOlivier Martin <olivier.martin@arm.com>
Wed, 2 Apr 2014 17:33:44 +0000 (17:33 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 Apr 2014 17:33:44 +0000 (17:33 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15428 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/Bds/BootOption.c
EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c

index ee0301e..8993cb1 100644 (file)
@@ -86,6 +86,7 @@ BootOptionStart (
                                 (CHAR8*)(LinuxArguments + 1),\r
                                 FdtDevicePath);\r
 \r
+      FreePool (DefaultFdtDevicePath);\r
       FreePool (FdtDevicePath);\r
     }\r
   } else {\r
index 6f4b66b..04ad9c0 100644 (file)
@@ -118,6 +118,8 @@ BootAndroidBootImg (
     FreePool (RamdiskDevicePath);\r
   }\r
 \r
+  FreePool (FdtDevicePath);\r
+\r
   // If we got here we do a confused face because BootLinuxFdt returned,\r
   // reporting success.\r
   DEBUG ((EFI_D_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));\r