Message ID | 586c7aad.0834c80a.d7aff.122e@mx.google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jan 03, 2017 at 08:31:34PM -0800, Li Qiang wrote: > From: Li Qiang <liqiang6-s@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 <liqiang6-s@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
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; }