Message ID | 20170801112539.6537-1-wei.liu2@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Wei Liu writes ("[PATCH] 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>
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c index cf403432d2..b5f316a1dc 100644 --- a/tools/libxc/xc_dom_core.c +++ b/tools/libxc/xc_dom_core.c @@ -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;
Signed-off-by: Wei Liu <wei.liu2@citrix.com> --- tools/libxc/xc_dom_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)