Razdroid/razdroid-hwcomposer — pull request #1 by aharter (2013-04-12 09:40:45+00:00)
Title: fixed possible memory leak

Calling "hwc_prepare" allocates memory for hwc_layer_rd.
The allocated memory isn't freed, leaving a memory leak.

Since the function seems to be called quite often.
To reduce the calls of malloc and free, I moved the allocation handling into the open and closing functions of the device.