xen/xsm: flask: Check xmalloc_array() return in security_sid_to_context()
authorJulien Grall <julien.grall@arm.com>
Fri, 4 Oct 2019 16:53:26 +0000 (17:53 +0100)
committerJulien Grall <julien.grall@arm.com>
Mon, 7 Oct 2019 09:09:34 +0000 (10:09 +0100)
commit4a647ad128a6e8ea91e9df140708d80548bf47f7
treeb6ba06705367941c262e200ef722eab2c35f44a4
parent38ad94acf09f6822d6005144935b58228da33a04
xen/xsm: flask: Check xmalloc_array() return in security_sid_to_context()

xmalloc_array() may return NULL if there are memory. Rather than trying
to deference it directly, we should check the return value first.

Coverity-ID: 1381852
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/xsm/flask/ss/services.c