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

[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
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment