]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
tools/libxc: error handling for the postcopy() callback
authorWen Congyang <wency@cn.fujitsu.com>
Tue, 19 Jan 2016 07:17:41 +0000 (15:17 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 20 Jan 2016 17:10:30 +0000 (17:10 +0000)
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_sr_save.c

index e532168181c47e9c3e250daf64f3bca322953305..e4ba56048a81c8b8e90e3c3bcc9e1a354ec50600 100644 (file)
@@ -791,7 +791,9 @@ static int save(struct xc_sr_context *ctx, uint16_t guest_type)
             if ( rc )
                 goto err;
 
-            ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
+            rc = ctx->save.callbacks->postcopy(ctx->save.callbacks->data);
+            if ( rc <= 0 )
+                goto err;
 
             rc = ctx->save.callbacks->checkpoint(ctx->save.callbacks->data);
             if ( rc <= 0 )