mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
libxc: check pointer is not null before printing
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
dbf2a76856
commit
613aecb4df
1 file changed
+2
-1
@@ -754,7 +754,8 @@ struct xc_dom_image *xc_dom_allocate(xc_interface *xch,
|
||||
struct xc_dom_image *dom;
|
||||
|
||||
xc_dom_printf(xch, "%s: cmdline=\"%s\", features=\"%s\"",
|
||||
__FUNCTION__, cmdline, features);
|
||||
__FUNCTION__, cmdline ? cmdline : "",
|
||||
features ? features : "");
|
||||
dom = malloc(sizeof(*dom));
|
||||
if ( !dom )
|
||||
goto err;
|
||||
|
||||