summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorMasanari Iida <standby24x7@gmail.com>2014-02-12 22:46:25 +0900
committerThomas Hellstrom <thellstrom@vmware.com>2014-02-18 14:03:32 +0100
commit7a444d1f0b557c68f847050b33713ae7b56f25e7 (patch)
treef09ed2d32626920e4b42e9926317034895b420ae /drivers/gpu/drm/ttm
parent728a0cdf065b9f42d1ff25d94858f824bb0989ba (diff)
downloadop-kernel-dev-7a444d1f0b557c68f847050b33713ae7b56f25e7.zip
op-kernel-dev-7a444d1f0b557c68f847050b33713ae7b56f25e7.tar.gz
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 <standby24x7@gmail.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_agp_backend.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 3302f99e..764be36 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;
}
OpenPOWER on IntegriCloud