diff options
author | Li Qiang | 2017-01-04 05:31:34 +0100 |
---|---|---|
committer | Daniel P. Berrange | 2017-02-27 14:37:14 +0100 |
commit | 0072d2a9fce4835ab2b9ee70aaca0169fb25fa0c (patch) | |
tree | a6b0bbfb5dae31b48cc9b3ce1d234524371c5dd8 /crypto | |
parent | Merge remote-tracking branch 'remotes/artyom/tags/pull-sun4v-20170226' into s... (diff) | |
download | qemu-0072d2a9fce4835ab2b9ee70aaca0169fb25fa0c.tar.gz qemu-0072d2a9fce4835ab2b9ee70aaca0169fb25fa0c.tar.xz qemu-0072d2a9fce4835ab2b9ee70aaca0169fb25fa0c.zip |
crypto: fix leak in ivgen essiv init
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ivgen-essiv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/ivgen-essiv.c b/crypto/ivgen-essiv.c index 634de63338..cba20bde6c 100644 --- 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; } |