[xen master] libxc: check pointer is not null before printing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[xen master] libxc: check pointer is not null before printing

patchbot
commit 613aecb4df005608c664d8cefc4b54ad73f6c876
Author:     Wei Liu <[hidden email]>
AuthorDate: Tue Aug 1 12:25:39 2017 +0100
Commit:     Wei Liu <[hidden email]>
CommitDate: Fri Aug 4 11:55:51 2017 +0100

    libxc: check pointer is not null before printing
   
    Signed-off-by: Wei Liu <[hidden email]>
    Acked-by: Ian Jackson <[hidden email]>
---
 tools/libxc/xc_dom_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index cf40343..b5f316a 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;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog
Loading...