dect
/
linux-2.6
Archived
13
0
Fork 0

[PATCH] tpm: fix memory leak

The eventname was kmalloc'd and not freed in the *_show functions.

This bug was found by Coverity.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Kylene Jo Hall 2006-04-22 02:36:35 -07:00 committed by Linus Torvalds
parent b9251b823b
commit 59e89f3a09
1 changed files with 2 additions and 0 deletions

View File

@ -306,6 +306,7 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)
/* 5th: delimiter */
seq_putc(m, '\0');
kfree(eventname);
return 0;
}
@ -353,6 +354,7 @@ static int tpm_ascii_bios_measurements_show(struct seq_file *m, void *v)
/* 4th: eventname <= max + \'0' delimiter */
seq_printf(m, " %s\n", eventname);
kfree(eventname);
return 0;
}