From: Andrew Cooper Date: Wed, 1 Oct 2014 10:09:17 +0000 (+0100) Subject: tools/libxl: Initialise rc on error paths of libxl_domain_remus_start() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4291 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bc8e20414aeacdb23d183793c1d947e28c26685b;p=xen.git tools/libxl: Initialise rc on error paths of libxl_domain_remus_start() Coverity-ID: 1242320 Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Shriram Rajagopalan CC: Yang Hongyang Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 9f629c48af..3f0a7ffba2 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -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);