mirror of https://github.com/xqemu/xqemu.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);
|
ret = sizeof(*header);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf += ret;
|
buf += ret;
|
||||||
|
|
Loading…
Reference in New Issue