mirror of https://gitee.com/openkylin/qemu.git
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