Crypto: fix leak in ivgen essiv init
PATCH 1/1 Crypto: fix leak in ivgen essiv init
From: Li Qiang <[email protected]>
On error path, the 'salt' doesn't been freed thus leading a memory leak. This patch avoid this.
Signed-off-by Li Qiang <[email protected]>
--- crypto/ivgen-essiv.c | 1 + 1 file changed, 1 insertion(+)
crypto/ivgen-essiv.c +1 -0
@@ -48,6 +48,7 @@ static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen, &salt, &nhash, errp) < 0) {g_free (essiv); +g_free (salt);return -1 ; }
Signature · 1 line
1.8.3.1
Quoted 15 lines · Li Qiang
From: Li Qiang <[email protected]>
On error path, the 'salt' doesn't been freed thus leading a memory leak. This patch avoid this.
Signed-off-by Li Qiang <[email protected]>--- crypto/ivgen-essiv.c | 1 + 1 file changed, 1 insertion(+)crypto/ivgen-essiv.c +0
-0
crypto/ivgen-essiv.c static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen, · line 53
Quoted 6 lines
crypto/ivgen-essiv.c +1
-0@@ -48,6 +48,7 @@ static int qcrypto_ivgen_essiv_init(QCryptoIVGen *ivgen, &salt, &nhash, errp) < 0) {g_free (essiv); +g_free (salt);return -1 ; }
Looks good, thanks, added to the crypto-next queue.
Regards,
Daniel
Signature · 3 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|