mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 01:43:39 +00:00
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>
This commit is contained in:
parent
d992f2f136
commit
0072d2a9fc
|
@ -48,6 +48,7 @@ static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen,
|
||||||
&salt, &nhash,
|
&salt, &nhash,
|
||||||
errp) < 0) {
|
errp) < 0) {
|
||||||
g_free(essiv);
|
g_free(essiv);
|
||||||
|
g_free(salt);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue