mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
hw/sd.c: fix migration of dynamically allocated buffer "buf"
VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, not for buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE macro, which will do migration right. Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Michael Walle <michael@walle.cc> Message-id: 1362923278-4080-3-git-send-email-i.mitsyanko@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8070568b9a
commit
5f00679ee9
1 changed files with 1 additions and 1 deletions
2
hw/sd.c
2
hw/sd.c
|
@ -478,7 +478,7 @@ static const VMStateDescription sd_vmstate = {
|
|||
VMSTATE_UINT64(data_start, SDState),
|
||||
VMSTATE_UINT32(data_offset, SDState),
|
||||
VMSTATE_UINT8_ARRAY(data, SDState, 512),
|
||||
VMSTATE_BUFFER_UNSAFE(buf, SDState, 1, 512),
|
||||
VMSTATE_BUFFER_POINTER_UNSAFE(buf, SDState, 1, 512),
|
||||
VMSTATE_BOOL(enable, SDState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue