Commit fb3409de authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Juan Quintela

Unlock ramlist lock also in error case

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
Reviewed-by: default avatarReviewed-by: Eric Blake <eblake@redhat.com>
parent 47f4dac3
......@@ -642,12 +642,13 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
i++;
}
qemu_mutex_unlock_ramlist();
if (ret < 0) {
bytes_transferred += total_sent;
return ret;
}
qemu_mutex_unlock_ramlist();
qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
total_sent += 8;
bytes_transferred += total_sent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment