Re: [PATCH] Memory leak in tpm_ascii_bios_measurements_open() fix.

2007-07-19 Thread Satyam Sharma
On 7/20/07, Yinghai Lu <[EMAIL PROTECTED]> wrote: out_free: kfree(log->bios_event_log); kfree(log); out: return err; could kill one extra goto. Such constructs disallow the success path from falling through to the same "return err;" (with err = 0 for success obviously) - To unsubscri

Re: [PATCH] Memory leak in tpm_ascii_bios_measurements_open() fix.

2007-07-19 Thread Yinghai Lu
On 7/19/07, Satyam Sharma <[EMAIL PROTECTED]> wrote: On 7/20/07, Reiner Sailer <[EMAIL PROTECTED]> wrote: > > Jesper Juhl <[EMAIL PROTECTED]> wrote on 07/18/2007 07:11:54 PM: > > > > +++ b/drivers/char/tpm/tpm_bios.c > > @@ -427,7 +427,7 @@ static int > > tpm_ascii_bios_measurements_open(stru

Re: [PATCH] Memory leak in tpm_ascii_bios_measurements_open() fix.

2007-07-19 Thread Satyam Sharma
On 7/20/07, Reiner Sailer <[EMAIL PROTECTED]> wrote: Jesper Juhl <[EMAIL PROTECTED]> wrote on 07/18/2007 07:11:54 PM: > > +++ b/drivers/char/tpm/tpm_bios.c > @@ -427,7 +427,7 @@ static int > tpm_ascii_bios_measurements_open(struct inode *inode, >return -ENOMEM; > > if ((err =

Re: [PATCH] Memory leak in tpm_ascii_bios_measurements_open() fix.

2007-07-19 Thread Reiner Sailer
Jesper, thank you very much for finding this error and for posting a patch proposal. Since Kylene is not online, I am responding. Please see my inlines and an alternative patch proposal below. Jesper Juhl <[EMAIL PROTECTED]> wrote on 07/18/2007 07:11:54 PM: > Ehlo, > > Coverity found a memor