]> Git Repo - qemu.git/commitdiff
qcow2: don't leak buffer for unexpected qcow_version in header
authorJim Meyering <[email protected]>
Mon, 21 May 2012 11:06:54 +0000 (13:06 +0200)
committerKevin Wolf <[email protected]>
Fri, 25 May 2012 16:12:54 +0000 (18:12 +0200)
Signed-off-by: Jim Meyering <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2.c

index 655799c6a0fa89dc03274d3b66d60175917963fd..c2e49cded3611319848c92041ac76d70843cfb63 100644 (file)
@@ -919,7 +919,8 @@ int qcow2_update_header(BlockDriverState *bs)
         ret = sizeof(*header);
         break;
     default:
-        return -EINVAL;
+        ret = -EINVAL;
+        goto fail;
     }
 
     buf += ret;
This page took 0.028088 seconds and 4 git commands to generate.