Skip to content

Commit

Permalink
drm/ttm: Fix memory leak in ttm_agp_backend.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masanari Iida authored and Thomas Hellstrom committed Feb 18, 2014
1 parent 728a0cd commit 7a444d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/ttm/ttm_agp_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7a444d1

Please sign in to comment.