aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_dom_arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxc/xc_dom_arm.c')
-rw-r--r--tools/libxc/xc_dom_arm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index aaf35ca70d..df59ffb84c 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -170,6 +170,8 @@ int arch_setup_meminit(struct xc_dom_image *dom)
dom->shadow_enabled = 1;
dom->p2m_host = xc_dom_malloc(dom, sizeof(xen_pfn_t) * dom->total_pages);
+ if ( dom->p2m_host == NULL )
+ return -EINVAL;
/* setup initial p2m */
for ( pfn = 0; pfn < dom->total_pages; pfn++ )