tools: libxl: check errors from libxl_create_logfile for stubdom log
PATCH 1/1 tools: libxl: check errors from libxl_create_logfile for stubdom log
Spotted by Coverity after the recent similar fix to libxl__create_qemu_logfile.
Signed-off-by Ian Campbell <[email protected]>
--- tools/libxl/libxl_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/libxl/libxl_dm.c +2 -1
@@ -1257,7 +1257,8 @@ static void spawn_stub_launch_dm(libxl__egc *egc,case STUBDOM_CONSOLE_LOGGING : name =libxl__sprintf (gc,"qemu-dm-%s" ,libxl_domid_to_name (ctx, guest_domid)); -libxl_create_logfile (ctx, name, &filename); + ret =libxl_create_logfile (ctx, name, &filename); +if (ret) goto out; console[i].output =libxl__sprintf (gc,"file:%s" , filename);free (filename);break ;
Signature · 1 line
2.1.4
Quoted 4 lines · Ian Campbell
Spotted by Coverity after the recent similar fix to
libxl__create_qemu_logfile.Signed-off-by Ian Campbell <[email protected]>
Acked-by Wei Liu <[email protected]>
Quoted 20 lines
--- tools/libxl/libxl_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/libxl/libxl_dm.c +2
-1@@ -1257,7 +1257,8 @@ static void spawn_stub_launch_dm(libxl__egc *egc,case STUBDOM_CONSOLE_LOGGING : name =libxl__sprintf (gc,"qemu-dm-%s" ,libxl_domid_to_name (ctx, guest_domid)); -libxl_create_logfile (ctx, name, &filename); + ret =libxl_create_logfile (ctx, name, &filename); +if (ret) goto out; console[i].output =libxl__sprintf (gc,"file:%s" , filename);free (filename);break ;Signature · 1 line
2.1.4
Ian Campbell
AppliedQuoted 7 lines · Wei Liu
Quoted 4 lines · Ian Campbell
Spotted by Coverity after the recent similar fix to
libxl__create_qemu_logfile.Signed-off-by Ian Campbell <[email protected]>Acked-by Wei Liu <[email protected]>
Applied, thanks.