Skip to content

Commit

Permalink
drm/radeon/kms: fix memory leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
Jiri Slaby authored and airlied committed Jan 7, 2010
1 parent 1d3d51b commit 5eb2261
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/radeon/radeon_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5eb2261

Please sign in to comment.