On Tue, Jan 03, 2017 at 08:31:34PM -0800, Li Qiang wrote: > From: Li Qiang <liqiang...@360.cn> > > On error path, the 'salt' doesn't been freed thus leading > a memory leak. This patch avoid this. > > Signed-off-by: Li Qiang <liqiang...@360.cn> > --- > crypto/ivgen-essiv.c | 1 + > 1 file changed, 1 insertion(+) > > 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 @@ 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 -- |: 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/ :|