efi_selftest: do not use efi_free_pool()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 12 Feb 2019 20:50:45 +0000 (21:50 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 16 Feb 2019 14:42:19 +0000 (15:42 +0100)
In efi_selftest we are in EFI land. We should not use U-Boot library
functions but boot time services for memory management.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
lib/efi_selftest/efi_selftest_block_device.c
lib/efi_selftest/efi_selftest_startimage_exit.c
lib/efi_selftest/efi_selftest_startimage_return.c

index 1cdd8307f4f1d0073409cea821a54b33fd46c551..21409aed6f54e90e29b0cd52541918e00003f6a4 100644 (file)
@@ -264,7 +264,7 @@ static int teardown(void)
        }
 
        if (image) {
-               r = efi_free_pool(image);
+               r = boottime->free_pool(image);
                if (r != EFI_SUCCESS) {
                        efi_st_error("Failed to free image\n");
                        return EFI_ST_FAILURE;
index 0d9e16437a4684e9f330abbae9f2d3c5191008b6..fa4b7d4a9b6597a8455b61f9cf91690420058b08 100644 (file)
@@ -103,7 +103,7 @@ static int teardown(void)
        efi_status_t r = EFI_ST_SUCCESS;
 
        if (image) {
-               r = efi_free_pool(image);
+               r = boottime->free_pool(image);
                if (r != EFI_SUCCESS) {
                        efi_st_error("Failed to free image\n");
                        return EFI_ST_FAILURE;
index 3c6249fdf1124bbf5985bb4519b8606bfdd9bbe7..fabf53d983b8c97d4c4ee9af61797d671e9b707e 100644 (file)
@@ -103,7 +103,7 @@ static int teardown(void)
        efi_status_t r = EFI_ST_SUCCESS;
 
        if (image) {
-               r = efi_free_pool(image);
+               r = boottime->free_pool(image);
                if (r != EFI_SUCCESS) {
                        efi_st_error("Failed to free image\n");
                        return EFI_ST_FAILURE;