diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-02-22 22:58:03 (GMT) |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2015-03-04 23:23:40 (GMT) |
commit | 5b2e2b6c5e542f7334dcaeb5b577d8328a5f2fc0 (patch) | |
tree | d491dd2bfef04f14bc8a38ab609300b9c889943b | |
parent | ba0312a6108f5214efb4659c4dbba218c5b9eb8d (diff) | |
download | linux-5b2e2b6c5e542f7334dcaeb5b577d8328a5f2fc0.tar.xz |
drm/msm/atomic: Don't leak atomic commit object when commit fails
If the atomic commit fails due to completion wait interruption the
atomic commit object is not freed and is thus leaked. Free it.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r-- | drivers/gpu/drm/msm/msm_atomic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index 871aa21..18fd643 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -219,8 +219,10 @@ int msm_atomic_commit(struct drm_device *dev, * mark our set of crtc's as busy: */ ret = start_atomic(dev->dev_private, c->crtc_mask); - if (ret) + if (ret) { + kfree(c); return ret; + } /* * This is the point of no return - everything below never fails except |