From: Masanari Iida Date: Wed, 12 Feb 2014 13:46:25 +0000 (+0900) Subject: drm/ttm: Fix memory leak in ttm_agp_backend.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a444d1f0b557c68f847050b33713ae7b56f25e7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/ttm: Fix memory leak in ttm_agp_backend.c This patch fix a memory leak found by cppcheck. [drivers/gpu/drm/ttm/ttm_agp_backend.c:129]: (error) Memory leak: agp_be Signed-off-by: Masanari Iida Reviewed-by: Thomas Hellstrom --- diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c index 3302f99e7497..764be36397fd 100644 --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c @@ -126,6 +126,7 @@ struct ttm_tt *ttm_agp_tt_create(struct ttm_bo_device *bdev, agp_be->ttm.func = &ttm_agp_func; if (ttm_tt_init(&agp_be->ttm, bdev, size, page_flags, dummy_read_page)) { + kfree(agp_be); return NULL; }