tools/libxl: Initialise rc on error paths of libxl_domain_remus_start()
PATCH 1/1 tools/libxl: Initialise rc on error paths of libxl_domain_remus_start()
Coverity-ID: 1242320
Signed-off-by Andrew Cooper <[email protected]>
CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
CC Wei Liu <[email protected]>
CC Shriram Rajagopalan <[email protected]>
CC Yang Hongyang <[email protected]>
--- tools/libxl/libxl.c | 2 ++ 1 file changed, 2 insertions(+)
tools/libxl/libxl.c +2 -0
@@ -816,6 +816,7 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info, !libxl_defbool_val(info->diskbuf))) {LOG (ERROR ,"Unsafe mode must be enabled to replicate to /dev/null," "disable network buffering and disk replication" ); + rc =ERROR_FAIL ; goto out; }
@@ -839,6 +840,7 @@ int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info,if (libxl_defbool_val (info->netbuf)) {if (!libxl__netbuffer_enabled (gc)) {LOG (ERROR ,"Remus: No support for network buffering" ); + rc =ERROR_FAIL ; goto out; } rds->device_kind_flags |= (1 <<LIBXL__DEVICE_KIND_VIF );
Signature · 1 line
1.7.10.4
Quoted 2 lines · Andrew Cooper
Coverity-ID: 1242320
Signed-off-by Andrew Cooper <[email protected]>
Acked-by Ian Campbell <[email protected]>
Quoted 5 lines · Ian Campbell
Quoted 2 lines · Andrew Cooper
Coverity-ID: 1242320
Signed-off-by Andrew Cooper <[email protected]>Acked-by Ian Campbell <[email protected]>
And applied, thanks.