projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
824808d
)
block/crypto: Fix memory leak in create error path
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 4 Jul 2018 12:55:06 +0000
(14:55 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Thu, 5 Jul 2018 08:29:19 +0000
(10:29 +0200)
Fixes: Coverity CID 1393782
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
block/crypto.c
patch
|
blob
|
history
diff --git
a/block/crypto.c
b/block/crypto.c
index 994172a3def1132d62c251f88bcce4235cbc4a3c..146d81c90afcd466aa3c7c1273079b4b275715a5 100644
(file)
--- a/
block/crypto.c
+++ b/
block/crypto.c
@@
-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,