diff options
author | Li Qiang <liqiang6-s@360.cn> | 2017-01-03 20:31:34 -0800 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-02-27 13:37:14 +0000 |
commit | 0072d2a9fce4835ab2b9ee70aaca0169fb25fa0c (patch) | |
tree | a6b0bbfb5dae31b48cc9b3ce1d234524371c5dd8 /crypto | |
parent | d992f2f1368ceb92e6bfd8efece174110f4236ff (diff) |
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; } |