EFI_GRAPHICS_OUTPUT_PROTOCOL.QueryMode() must allocate a buffer for the
mode information structure.
Adjust the unit test to free the buffer.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
}
gopobj = container_of(this, struct efi_gop_obj, ops);
+ ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, sizeof(gopobj->info),
+ (void **)info);
+ if (ret != EFI_SUCCESS)
+ goto out;
*size_of_info = sizeof(gopobj->info);
- *info = &gopobj->info;
+ memcpy(*info, &gopobj->info, sizeof(gopobj->info));
out:
return EFI_EXIT(ret);
}
efi_st_printf("Mode %u: %u x %u\n",
i, info->width, info->height);
+ ret = boottime->free_pool(info);
+ if (ret != EFI_SUCCESS) {
+ efi_st_printf("FreePool failed");
+ return EFI_ST_FAILURE;
+ }
}
return EFI_ST_SUCCESS;