lkml.org 
[lkml]   [2006]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] TPM: fix failure path leak
From: Randy Dunlap <rdunlap@xenotime.net>

kfree(devname) on the misc_register() failure path.
Otherwise it is lost forever.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/char/tpm/tpm.c | 1 +
1 files changed, 1 insertion(+)

--- linux-2618-rc1mm1.orig/drivers/char/tpm/tpm.c
+++ linux-2618-rc1mm1/drivers/char/tpm/tpm.c
@@ -1141,6 +1141,7 @@ struct tpm_chip *tpm_register_hardware(s
put_device(dev);
clear_bit(chip->dev_num, dev_mask);
kfree(chip);
+ kfree(devname);
return NULL;
}


---
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-07-13 03:17    [W:0.027 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site