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:
Wei Liu committed 2017-08-04 11:55:51 +01:00
1 parent dbf2a76856
commit 613aecb4df
1 file changed
+2 -1
+2 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.