All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Masanari Iida <standby24x7@gmail.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: Fix memory leak in ttm_agp_backend.c
Date: Thu, 13 Feb 2014 13:10:38 +0100	[thread overview]
Message-ID: <52FCB63E.1080601@shipmail.org> (raw)
In-Reply-To: <1392212785-23150-1-git-send-email-standby24x7@gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Hellstrom <thomas@shipmail.org>
To: Masanari Iida <standby24x7@gmail.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	airlied@linux.ie
Subject: Re: [PATCH] drm/ttm: Fix memory leak in ttm_agp_backend.c
Date: Thu, 13 Feb 2014 13:10:38 +0100	[thread overview]
Message-ID: <52FCB63E.1080601@shipmail.org> (raw)
In-Reply-To: <1392212785-23150-1-git-send-email-standby24x7@gmail.com>

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




  reply	other threads:[~2014-02-13 12:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 13:46 [PATCH] drm/ttm: Fix memory leak in ttm_agp_backend.c Masanari Iida
2014-02-13 12:10 ` Thomas Hellstrom [this message]
2014-02-13 12:10   ` Thomas Hellstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FCB63E.1080601@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=standby24x7@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.