aboutsummaryrefslogtreecommitdiff
path: root/block/vmdk.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2011-10-26 12:22:40 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-28 19:25:49 +0200
commitbac8d7b45dd855759204117e5a05452ede01bbab (patch)
tree1943758a64870820787fe9289897ee75473316e2 /block/vmdk.c
parentfb60105d4942a26f571b1be92a8b9e7528d0c4d8 (diff)
vmdk: Fix use of uninitialised value
In error cases, cid is never set. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vmdk.c')
-rw-r--r--block/vmdk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vmdk.c b/block/vmdk.c
index 6be592ffd6..6cdbfb791e 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -208,7 +208,7 @@ static void vmdk_free_last_extent(BlockDriverState *bs)
static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent)
{
char desc[DESC_SIZE];
- uint32_t cid;
+ uint32_t cid = 0;
const char *p_name, *cid_str;
size_t cid_str_size;
BDRVVmdkState *s = bs->opaque;