Skip to contentSkip to conversation

tools/libxl: Initialise rc on error paths of libxl_domain_remus_start()

PATCH In review Andrew Cooper 2 participants 3 messages Oct 1, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/libxl: Initialise rc on error paths of libxl_domain_remus_start()

Coverity-ID: 1242320

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
index 9f629c4..3f0a7ff 100644
@@ -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