commit | 0072d2a9fce4835ab2b9ee70aaca0169fb25fa0c | [log] [tgz] |
---|---|---|
author | Li Qiang <liqiang6-s@360.cn> | Tue Jan 03 20:31:34 2017 -0800 |
committer | Daniel P. Berrange <berrange@redhat.com> | Mon Feb 27 13:37:14 2017 +0000 |
tree | a6b0bbfb5dae31b48cc9b3ce1d234524371c5dd8 | |
parent | d992f2f1368ceb92e6bfd8efece174110f4236ff [diff] [blame] |
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>
diff --git a/crypto/ivgen-essiv.c b/crypto/ivgen-essiv.c index 634de63..cba20bd 100644 --- a/crypto/ivgen-essiv.c +++ b/crypto/ivgen-essiv.c
@@ -48,6 +48,7 @@ &salt, &nhash, errp) < 0) { g_free(essiv); + g_free(salt); return -1; }