On Fri, May 05, 2017 at 09:08:44PM +0200, Christophe JAILLET wrote:I can split it if you want, but the 3 points are more or less related and all belong to the same few lines of code. I didn't think having 3 patches was needed in this case. I just wanted to give a detailed changelog.
This patch fixes several issues:Then it should be multiple patches, not fixing 3 things in one patch,
- if the 1st 'kzalloc' fails, we dereference a NULL pointer
- if the 2nd 'kzalloc' fails, there is a memory leak
- if 'sysfs_create_bin_file' fails there is also a memory leak
right?
thanks,
greg k-h