Skip to content

Commit

Permalink
drm/omap: Fix memory leak in omap_gem_op_async
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Subhajit Paul authored and Tomi Valkeinen committed Apr 15, 2014
1 parent b841aed commit 15ec2ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/omapdrm/omap_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.. */
Expand Down

0 comments on commit 15ec2ca

Please sign in to comment.