projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d992f2f
)
crypto: fix leak in ivgen essiv init
author
Li Qiang
<liqiang6-s@360.cn>
Wed, 4 Jan 2017 04:31:34 +0000
(20:31 -0800)
committer
Daniel P. Berrange
<berrange@redhat.com>
Mon, 27 Feb 2017 13:37:14 +0000
(13:37 +0000)
On error path, the 'salt' doesn't been freed thus leading
a memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
crypto/ivgen-essiv.c
patch
|
blob
|
history
diff --git
a/crypto/ivgen-essiv.c
b/crypto/ivgen-essiv.c
index 634de63338e5a45345f1072fde8819d37f27d6b5..cba20bde6c9931caf92c205bb94de2aff3dabd3b 100644
(file)
--- a/
crypto/ivgen-essiv.c
+++ b/
crypto/ivgen-essiv.c
@@
-48,6
+48,7
@@
static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen,
&salt, &nhash,
errp) < 0) {
g_free(essiv);
+ g_free(salt);
return -1;
}