lkml.org 
[lkml]   [2014]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/ttm: Fix memory leak in ttm_agp_backend.c
On 02/12/2014 02:46 PM, Masanari Iida wrote:
> 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>
> ---
> drivers/gpu/drm/ttm/ttm_agp_backend.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> index 3302f99..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;
> }
>

Thanks, I'll include in the next ttm-fixes pull request.

/Thomas





\
 
 \ /
  Last update: 2014-02-13 14:21    [W:0.035 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site