Commit 2e82636a authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds
Browse files

[PATCH] TPM: fix failure path leak



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

Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Cc: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3a5f5e48
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}