libxc: Prevent dereferencing NULL pointers returned from xc_dom_allocate()
authorJennifer Herbert <Jennifer.Herbert@citrix.com>
Wed, 1 Jul 2015 17:37:09 +0000 (17:37 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 3 Jul 2015 15:47:13 +0000 (16:47 +0100)
commit7d403f5bc7b5f045103f67bededd136ac3461e35
tree7a4d7ef5e842f18d5107fc94a89174826f8dde17
parent9ba66fc82e9bfff350d8ad92d918787dd10cad40
libxc: Prevent dereferencing NULL pointers returned from xc_dom_allocate()

The return from xc_dom_allocate is not checked for a NULL value.
This patch fixes this, causing it to return from the function with an error.

Signed-off-by: Jennifer Herbert <jennifer.herbert@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_dom_compat_linux.c