Check it just in case. We might just as well panic there because runtime
won't be functioning anyway.
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
new_memmap = krealloc(new_memmap,
(count + 1) * memmap.desc_size,
GFP_KERNEL);
+ if (!new_memmap)
+ goto err_out;
+
memcpy(new_memmap + (count * memmap.desc_size), md,
memmap.desc_size);
count++;
EFI_VARIABLE_BOOTSERVICE_ACCESS |
EFI_VARIABLE_RUNTIME_ACCESS,
0, NULL);
+
+ return;
+
+ err_out:
+ pr_err("Error reallocating memory, EFI runtime non-functional!\n");
}
/*