]> err.no Git - linux-2.6/commitdiff
[PATCH] TPM: fix failure path leak
authorRandy Dunlap <rdunlap@xenotime.net>
Fri, 14 Jul 2006 07:24:28 +0000 (00:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 15 Jul 2006 04:53:55 +0000 (21:53 -0700)
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>
drivers/char/tpm/tpm.c

index 6889e7db3aff5285dd7824317c3f6469fc2e00c2..a082a2e342522a78edfd642f272784bd1fbee276 100644 (file)
@@ -1141,6 +1141,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend
                put_device(dev);
                clear_bit(chip->dev_num, dev_mask);
                kfree(chip);
+               kfree(devname);
                return NULL;
        }