Revision: 17078
http://sourceforge.net/p/edk2/code/17078
Author: lersek
Date: 2015-03-27 17:27:24 +0000 (Fri, 27 Mar 2015)
Log Message:
-----------
ArmPlatformPkg: fix two instances of FreePool () on NULL value
This is a copy/paste of the exact same code in both cases: Buffer
should only be freed on the success path, otherwise it will be
NULL
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Ronald Cron <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPlatformPkg/Bds/Bds.c
trunk/edk2/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
Modified: trunk/edk2/ArmPlatformPkg/Bds/Bds.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/Bds.c 2015-03-27 17:27:14 UTC (rev 17077)
+++ trunk/edk2/ArmPlatformPkg/Bds/Bds.c 2015-03-27 17:27:24 UTC (rev 17078)
@@ -155,8 +155,8 @@
*Handle = Buffer[0];
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
ASSERT_EFI_ERROR(Status);
+ FreePool (Buffer);
}
- FreePool (Buffer);
} else {
Status = EFI_SUCCESS;
}
Modified:
trunk/edk2/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
2015-03-27 17:27:14 UTC (rev 17077)
+++ trunk/edk2/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
2015-03-27 17:27:24 UTC (rev 17078)
@@ -179,8 +179,8 @@
*Handle = Buffer[0];
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
ASSERT_EFI_ERROR (Status);
+ FreePool (Buffer);
}
- FreePool (Buffer);
} else {
Status = EFI_SUCCESS;
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits