aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block.c b/block.c
index 01655ded13..b2bdff90e4 100644
--- a/block.c
+++ b/block.c
@@ -1463,9 +1463,8 @@ int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags, Error **errp)
ret = bdrv_create(&bdrv_qcow2, tmp_filename, opts, &local_err);
qemu_opts_del(opts);
if (ret < 0) {
- error_setg_errno(errp, -ret, "Could not create temporary overlay "
- "'%s': %s", tmp_filename,
- error_get_pretty(local_err));
+ error_setg(errp, "Could not create temporary overlay '%s': %s",
+ tmp_filename, error_get_pretty(local_err));
error_free(local_err);
goto out;
}