mirror of
https://github.com/qemu/qemu.git
synced 2025-08-05 01:40:05 +00:00
qcow2: don't leak buffer for unexpected qcow_version in header
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
aeb29b6459
commit
b6c147622d
@ -919,7 +919,8 @@ int qcow2_update_header(BlockDriverState *bs)
|
||||
ret = sizeof(*header);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
buf += ret;
|
||||
|
Loading…
Reference in New Issue
Block a user