]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Fix a memory leak
authorxinhui pan <xinhui.pan@amd.com>
Fri, 19 Feb 2021 04:25:47 +0000 (12:25 +0800)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 25 Feb 2021 09:18:45 +0000 (10:18 +0100)
commita75e106c4c3e851237f748ec3ae2e71d0cf4680e
treeebaac8e4d6eb7715aa93a2a93851edb066184b46
parente5ba7b48c9fe69804d110ac389e154c5202e5ff1
drm/ttm: Fix a memory leak

Free the memory on failure.
Also no need to re-alloc memory on retry.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219042547.44855-1-xinhui.pan@amd.com
Reviewed-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org # 5.11
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/ttm/ttm_bo.c