Re: [PATCH] drm/crc-debugfs: Fix memleak in crc_control_write

2020-09-01 Thread Daniel Vetter
On Wed, Aug 19, 2020 at 02:55:15PM +0300, Laurent Pinchart wrote: > Hi Dinghao, > > Thank you for the patch. > > On Wed, Aug 19, 2020 at 04:22:28PM +0800, Dinghao Liu wrote: > > When verify_crc_source() fails, source needs to be freed. > > However, current code is returning directly and ends up >

Re: [PATCH] drm/crc-debugfs: Fix memleak in crc_control_write

2020-08-19 Thread Laurent Pinchart
Hi Dinghao, Thank you for the patch. On Wed, Aug 19, 2020 at 04:22:28PM +0800, Dinghao Liu wrote: > When verify_crc_source() fails, source needs to be freed. > However, current code is returning directly and ends up > leaking memory. > > Fixes: c0811a7d5befe ("drm/crc: Cleanup crtc_crc_open func

[PATCH] drm/crc-debugfs: Fix memleak in crc_control_write

2020-08-19 Thread Dinghao Liu
When verify_crc_source() fails, source needs to be freed. However, current code is returning directly and ends up leaking memory. Fixes: c0811a7d5befe ("drm/crc: Cleanup crtc_crc_open function") Signed-off-by: Dinghao Liu --- drivers/gpu/drm/drm_debugfs_crc.c | 4 +++- 1 file changed, 3 insertio