Skip to content

Commit 0b68589

Browse files
committed
block/crypto: Fix memory leak in create error path
Fixes: Coverity CID 1393782 Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]>
1 parent 824808d commit 0b68589

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/crypto.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static int coroutine_fn block_crypto_co_create_opts_luks(const char *filename,
551551
/* Create protocol layer */
552552
ret = bdrv_create_file(filename, opts, errp);
553553
if (ret < 0) {
554-
return ret;
554+
goto fail;
555555
}
556556

557557
bs = bdrv_open(filename, NULL, NULL,

0 commit comments

Comments
 (0)