Skip to content

Commit

Permalink
vpc: Don't leak opts in vpc_open()
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
  • Loading branch information
kevmw committed Nov 5, 2018
1 parent d98205c commit c317b64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/vpc.c
Expand Up @@ -456,10 +456,12 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
}

qemu_co_mutex_init(&s->lock);
qemu_opts_del(opts);

return 0;

fail:
qemu_opts_del(opts);
qemu_vfree(s->pagetable);
#ifdef CACHE
g_free(s->pageentry_u8);
Expand Down

0 comments on commit c317b64

Please sign in to comment.