summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhajit Paul <subhajit_paul@ti.com>2014-04-11 12:53:30 +0530
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-04-15 13:35:27 +0300
commit15ec2ca964d7a52e7e0a452fe0f9c409d2f3eec6 (patch)
treecd97faade7e110ec53ebc640a42a0d8009146bcc
parentb841aedfcfd543d836c856bfde5a17c51cab6b26 (diff)
drm/omap: Fix memory leak in omap_gem_op_async
In omap_gem_op_async(), if a waiter is not added to the wait list, it needs to be free'd in the function itself. Make sure we free the waiter for this case. Signed-off-by: Subhajit Paul <subhajit_paul@ti.com> Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 70798b9fe635..9a68e9a28438 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -1226,6 +1226,8 @@ int omap_gem_op_async(struct drm_gem_object *obj, enum omap_gem_op op,
}
spin_unlock(&sync_lock);
+
+ kfree(waiter);
}
/* no waiting.. */