efi_loader: return NULL from device path functions
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 19 Jan 2018 19:24:37 +0000 (20:24 +0100)
committerAlexander Graf <agraf@suse.de>
Mon, 22 Jan 2018 22:09:13 +0000 (23:09 +0100)
commit04298686a43af15c091393fac71fc42e73efddbd
tree6ac13a8ba758413738cf7af23962694b20806963
parent2074f70064b5860db0d273ad3d050e87764c08e5
efi_loader: return NULL from device path functions

For the construction of device paths we need to call the
AllocatePool service. We should not ignore if it fails due to an
out of memory situation.

This patch changes the device path functions to return NULL if
the memory allocation fails.

Additional patches will be needed to fix the callers.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi_loader.h
lib/efi_loader/efi_device_path.c