Re: [tpmdd-devel] [PATCH v3 2/7] tpm: Replace the dynamically allocated bios_dir as struct dentry array.

2016-08-30 Thread Jarkko Sakkinen
On Tue, Aug 30, 2016 at 12:50:14AM -0400, Nayna Jain wrote: > bios_dir is defined as struct dentry **bios_dir, which results in > dynamic allocation and possible memory leak. This patch replaces > it with struct dentry array i.e. struct dentry *bios_dir[3] > similar to what is done for sysfs

[tpmdd-devel] [PATCH v3 2/7] tpm: Replace the dynamically allocated bios_dir as struct dentry array.

2016-08-29 Thread Nayna Jain
bios_dir is defined as struct dentry **bios_dir, which results in dynamic allocation and possible memory leak. This patch replaces it with struct dentry array i.e. struct dentry *bios_dir[3] similar to what is done for sysfs groups. Suggested-by: Jason Gunthorpe