Hi Phil, You may want to have a look at this patch since it addresses an incomplete fix of mine.
Thanks, Cristian S. > -----Original Message----- > From: Horia Geanta [mailto:[email protected]] > Sent: Thursday, December 12, 2013 6:10 PM > To: Nikos Mavrogiannopoulos > Cc: [email protected]; Stoica Cristian-B18196; Geanta Neag > Horia Ioan-B05471 > Subject: [RFC 1/9] fix private data memleak > > From: Cristian Stoica <[email protected]> > > This is the correct memleak fix as intended by > 50e714aeff2d6fb4c9d5793a706abb330aa073fc. The original fix does not > address deallocation problems when kzalloc(pcr) fails. > > Signed-off-by: Cristian Stoica <[email protected]> > Signed-off-by: Horia Geanta <[email protected]> > --- > ioctl.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/ioctl.c b/ioctl.c > index 999fb31..7a69e5a 100644 > --- a/ioctl.c > +++ b/ioctl.c > @@ -453,9 +453,9 @@ cryptodev_open(struct inode *inode, struct file > *filp) > int i; > > pcr = kzalloc(sizeof(*pcr), GFP_KERNEL); > + filp->private_data = pcr; > if (!pcr) > return -ENOMEM; > - filp->private_data = pcr; > > mutex_init(&pcr->fcrypt.sem); > mutex_init(&pcr->free.lock); > -- > 1.7.7.6 > _______________________________________________ Cryptodev-linux-devel mailing list [email protected] https://mail.gna.org/listinfo/cryptodev-linux-devel
