Re: [PATCH] dmaengine: ti: Fix a memory leak bug

2019-08-16 Thread Wenwen Wang
On Fri, Aug 16, 2019 at 2:42 AM Peter Ujfalusi wrote: > > > > On 16/08/2019 9.23, Wenwen Wang wrote: > > In ti_dra7_xbar_probe(), 'rsv_events' is allocated through kcalloc(). Then > > of_property_read_u32_array() is invoked to search for the property. > > However, if this process fails,

Re: [PATCH] dmaengine: ti: Fix a memory leak bug

2019-08-16 Thread Peter Ujfalusi
On 16/08/2019 9.23, Wenwen Wang wrote: > In ti_dra7_xbar_probe(), 'rsv_events' is allocated through kcalloc(). Then > of_property_read_u32_array() is invoked to search for the property. > However, if this process fails, 'rsv_events' is not deallocated, leading to > a memory leak bug. To fix

[PATCH] dmaengine: ti: Fix a memory leak bug

2019-08-16 Thread Wenwen Wang
In ti_dra7_xbar_probe(), 'rsv_events' is allocated through kcalloc(). Then of_property_read_u32_array() is invoked to search for the property. However, if this process fails, 'rsv_events' is not deallocated, leading to a memory leak bug. To fix this issue, free 'rsv_events' before returning the