block/crypto: Fix memory leak in create error path
PATCH 1/1 block/crypto: Fix memory leak in create error path
Fixes Coverity CID 1393782
Signed-off-by Kevin Wolf <[email protected]>
--- block/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/crypto.c +1 -1
@@ -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,
Signature · 1 line
2.13.6
Quoted 11 lines · Kevin Wolf
Fixes Coverity CID 1393782Signed-off-by Kevin Wolf <[email protected]>--- block/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block/crypto.c +0
-0
block/crypto.c static int coroutine_fn block_crypto_co_create_opts_luks(const char *filename, · line 557
Quoted 8 lines
block/crypto.c +1
-1@@ -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,
Reviewed-by Daniel P. Berrangé <[email protected]>
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|