Re: [alsa-devel] [PATCH] ALSA: firewire: fix a memory leak bug

2019-08-08 Thread Takashi Iwai
On Thu, 08 Aug 2019 11:04:03 +0200, Takashi Sakamoto wrote: > > Hi, > > On Thu, Aug 8, 2019, at 14:53, Wenwen Wang wrote: > > In iso_packets_buffer_init(), 'b->packets' is allocated through > > kmalloc_array(). Then, the aligned packet size is checked. If it is > > larger than PAGE_SIZE,

Re: [alsa-devel] [PATCH] ALSA: firewire: fix a memory leak bug

2019-08-08 Thread Takashi Sakamoto
Hi, On Thu, Aug 8, 2019, at 14:53, Wenwen Wang wrote: > In iso_packets_buffer_init(), 'b->packets' is allocated through > kmalloc_array(). Then, the aligned packet size is checked. If it is > larger than PAGE_SIZE, -EINVAL will be returned to indicate the error. > However, the allocated

[PATCH] ALSA: firewire: fix a memory leak bug

2019-08-07 Thread Wenwen Wang
In iso_packets_buffer_init(), 'b->packets' is allocated through kmalloc_array(). Then, the aligned packet size is checked. If it is larger than PAGE_SIZE, -EINVAL will be returned to indicate the error. However, the allocated 'b->packets' is not deallocated on this path, leading to a memory leak.