* [PATCH] drm/radeon/radeon_cp.c: fix resource leak on error
@ 2009-12-30 1:25 Darren Jenkins
2010-01-07 3:47 ` Dave Airlie
0 siblings, 1 reply; 2+ messages in thread
From: Darren Jenkins @ 2009-12-30 1:25 UTC (permalink / raw)
To: David Airlie, dri-devel mailing list, Kernel Janitors
Cc: Linux Kernel Mailing List
If drm_addmap() fails master_priv is leaked.
Coverity CID: 13195
Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
diff --git drivers/gpu/drm/radeon/radeon_cp.c drivers/gpu/drm/radeon/radeon_cp.c
index 0b2f9c2..06123ba 100644
--- drivers/gpu/drm/radeon/radeon_cp.c
+++ drivers/gpu/drm/radeon/radeon_cp.c
@@ -2145,6 +2145,7 @@ int radeon_master_create(struct drm_device *dev, struct drm_master *master)
&master_priv->sarea);
if (ret) {
DRM_ERROR("SAREA setup failed\n");
+ kfree(master_priv);
return ret;
}
master_priv->sarea_priv = master_priv->sarea->handle + sizeof(struct drm_sarea);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/radeon/radeon_cp.c: fix resource leak on error
2009-12-30 1:25 [PATCH] drm/radeon/radeon_cp.c: fix resource leak on error Darren Jenkins
@ 2010-01-07 3:47 ` Dave Airlie
0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2010-01-07 3:47 UTC (permalink / raw)
To: Darren Jenkins
Cc: David Airlie, dri-devel mailing list, Kernel Janitors,
Linux Kernel Mailing List
On Wed, Dec 30, 2009 at 11:25 AM, Darren Jenkins
<darrenrjenkins@gmail.com> wrote:
> If drm_addmap() fails master_priv is leaked.
>
I got a patch from Roel Kluin to fix this already, will push it out soon.
Dave.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-07 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 1:25 [PATCH] drm/radeon/radeon_cp.c: fix resource leak on error Darren Jenkins
2010-01-07 3:47 ` Dave Airlie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox