Skip to content

Commit

Permalink
block/crypto: Fix memory leak in create error path
Browse files Browse the repository at this point in the history
Fixes: Coverity CID 1393782
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
  • Loading branch information
kevmw committed Jul 5, 2018
1 parent 824808d commit 0b68589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/crypto.c
Expand Up @@ -551,7 +551,7 @@ static int coroutine_fn block_crypto_co_create_opts_luks(const char *filename,
/* Create protocol layer */
ret = bdrv_create_file(filename, opts, errp);
if (ret < 0) {
return ret;
goto fail;
}

bs = bdrv_open(filename, NULL, NULL,
Expand Down

0 comments on commit 0b68589

Please sign in to comment.