Browse Source

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>
Subhajit Paul 11 years ago
parent
commit
15ec2ca964
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/gpu/drm/omapdrm/omap_gem.c

+ 2 - 0
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.. */