diff options
author | Tom Rini <trini@konsulko.com> | 2023-04-03 16:45:41 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-03 16:45:41 -0400 |
commit | 288fe30a2367b8d0e3f416493150a38ebaa88459 (patch) | |
tree | 1f841eb95d9ceeda4aa3255fb1132a0342f9b19a /lib/efi_loader/efi_device_path_to_text.c | |
parent | fd4ed6b7e83ec3aea9a2ce21baea8ca9676f40dd (diff) | |
parent | 9876c8c147144db2c120fcc9ffa6de27f6894441 (diff) |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib/efi_loader/efi_device_path_to_text.c')
-rw-r--r-- | lib/efi_loader/efi_device_path_to_text.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c index 4b2ade3803f..8c76d8be605 100644 --- a/lib/efi_loader/efi_device_path_to_text.c +++ b/lib/efi_loader/efi_device_path_to_text.c @@ -32,11 +32,10 @@ static u16 *efi_str_to_u16(char *str) { efi_uintn_t len; u16 *out, *dst; - efi_status_t ret; len = sizeof(u16) * (utf8_utf16_strlen(str) + 1); - ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, len, (void **)&out); - if (ret != EFI_SUCCESS) + out = efi_alloc(len); + if (!out) return NULL; dst = out; utf8_utf16_strcpy(&dst, str); |