[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1262136345.8733.36.camel@ICE-BOX>
Date: Wed, 30 Dec 2009 12:25:45 +1100
From: Darren Jenkins <darrenrjenkins@...il.com>
To: David Airlie <airlied@...ux.ie>,
dri-devel mailing list <dri-devel@...ts.sourceforge.net>,
Kernel Janitors <kernel-janitors@...r.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/radeon/radeon_cp.c: fix resource leak on error
If drm_addmap() fails master_priv is leaked.
Coverity CID: 13195
Signed-off-by: Darren Jenkins <darrenrjenkins@...il.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists