From: Dan Carpenter <error27@gmail.com>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: kernel-janitors@vger.kernel.org,
Roy Spliet <r.spliet@student.tudelft.nl>,
"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>
Subject: [patch] nouveau: free the memory in nouveau_gart_manager_del()
Date: Sat, 25 Jun 2011 05:53:24 +0000 [thread overview]
Message-ID: <20110625055324.GS14591@shale.localdomain> (raw)
In the original code the kfree() doesn't do anything because
"mem->mm_node" has been set to NULL. This was introduced in
d2f96666c56a "drm/nouveau: create temp vmas for both src and dst of
bo moves"
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 765f0e5..ab79bf8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -846,8 +846,8 @@ nouveau_gart_manager_del(struct ttm_mem_type_manager *man,
struct ttm_mem_reg *mem)
{
nouveau_mem_node_cleanup(mem->mm_node);
- mem->mm_node = NULL;
kfree(mem->mm_node);
+ mem->mm_node = NULL;
}
static int
next reply other threads:[~2011-06-25 5:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-25 5:53 Dan Carpenter [this message]
2011-06-25 11:59 ` [patch] nouveau: free the memory in nouveau_gart_manager_del() Ben Skeggs
2011-06-26 22:19 ` walter harms
2011-06-27 4:59 ` Julia Lawall
2011-06-27 6:50 ` Dan Carpenter
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=20110625055324.GS14591@shale.localdomain \
--to=error27@gmail.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=r.spliet@student.tudelft.nl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox