LF-3256 drm/imx: lcdifv3: destroy dmt to avoid memory leak
authorFancy Fang <chen.fang@nxp.com>
Fri, 22 Jan 2021 02:00:14 +0000 (10:00 +0800)
committerFancy Fang <chen.fang@nxp.com>
Fri, 22 Jan 2021 03:52:34 +0000 (11:52 +0800)
commit541fe651a7c505b7425ef332056530aae07da380
tree779829c561808f0e4147ad855e8498f53c4040e7
parent84a3940078b27aa00086f0e36f90c41fbe3f9410
LF-3256 drm/imx: lcdifv3: destroy dmt to avoid memory leak

The 'dmt' is duplicated by 'drm_mode_find_dmt()' and it
should be explicitly freed after it has been used to avoid
memory leak.

This issue is detected by Coverity with CID 1149970.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
drivers/gpu/drm/imx/lcdifv3/lcdifv3-crtc.c