diff options
author | Randy Dunlap <rdunlap@xenotime.net> | 2006-07-14 03:24:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-15 00:53:55 -0400 |
commit | 2e82636a3dd8d3cf1ba87380608da4f6a0f6ec47 (patch) | |
tree | 4df3181f4cb752c9a7d5c9dd09301097d405875c | |
parent | 3a5f5e488ceee9e08df3dff3f01b12fafc9e7e68 (diff) |
[PATCH] TPM: fix failure path leak
kfree(devname) on the misc_register() failure path. Otherwise it is lost
forever.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/char/tpm/tpm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 6889e7db3aff..a082a2e34252 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -1141,6 +1141,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend | |||
1141 | put_device(dev); | 1141 | put_device(dev); |
1142 | clear_bit(chip->dev_num, dev_mask); | 1142 | clear_bit(chip->dev_num, dev_mask); |
1143 | kfree(chip); | 1143 | kfree(chip); |
1144 | kfree(devname); | ||
1144 | return NULL; | 1145 | return NULL; |
1145 | } | 1146 | } |
1146 | 1147 | ||