diff options
author | Jim Meyering <jim@meyering.net> | 2012-05-21 13:06:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-25 18:12:54 +0200 |
commit | b6c147622d31272f9728da9ec16d146bf8c45a74 (patch) | |
tree | 2780f0caf94a3fd9be74746c9160f31b2294a462 /block | |
parent | aeb29b6459cb9496b38c820f3faff64cf2369d0d (diff) |
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>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 655799c6a0..c2e49cded3 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -919,7 +919,8 @@ int qcow2_update_header(BlockDriverState *bs) ret = sizeof(*header); break; default: - return -EINVAL; + ret = -EINVAL; + goto fail; } buf += ret; |