image: Fix a memleak
Before this patch, this code allocated a buffer and then created an imlib image
from this via imlib_create_using_copied_data(), but this function does not take
ownership of the buffer you pass in and thus we had a memory leak.
This is fixed by using a separate function for creating "empty" images which
doesn't have this memory leak problem.
This patch was verified using a quick valgrind run and seemed to be fine.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>