libxl: initialise rc in libxl__domain_save error path
authorWei Liu <wei.liu2@citrix.com>
Sun, 28 Feb 2016 21:03:51 +0000 (16:03 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Sun, 28 Feb 2016 21:03:51 +0000 (16:03 -0500)
Commit 7449fb36 ("migration/save: pass checkpointed_stream from libxl to
libxc ") failed to initialise rc in the error path.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
tools/libxl/libxl_dom_save.c

index 4eb79604ad99886c7070e890386c779e1e28535d..f3288b911a215e677df12e856d2f40867898ee47 100644 (file)
@@ -341,6 +341,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss)
     if (dss->checkpointed_stream != LIBXL_CHECKPOINTED_STREAM_NONE && !r_info) {
         LOG(ERROR, "Migration stream is checkpointed, but there's no "
                    "checkpoint info!");
+        rc = ERROR_INVAL;
         goto out;
     }