mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 12:05:54 +00:00
drm/radeon/kms: fix memory leak
Stanse found a memory leak in radeon_master_create. master_priv is not freed/assigned on all paths. Fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
1d3d51b6d2
commit
5eb226132f
1 changed files with 1 additions and 0 deletions
|
@ -2145,6 +2145,7 @@ int radeon_master_create(struct drm_device *dev, struct drm_master *master)
|
||||||
&master_priv->sarea);
|
&master_priv->sarea);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
DRM_ERROR("SAREA setup failed\n");
|
DRM_ERROR("SAREA setup failed\n");
|
||||||
|
kfree(master_priv);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
master_priv->sarea_priv = master_priv->sarea->handle + sizeof(struct drm_sarea);
|
master_priv->sarea_priv = master_priv->sarea->handle + sizeof(struct drm_sarea);
|
||||||
|
|
Loading…
Add table
Reference in a new issue