Fix bitmaps memory leak

Signed-off-by: Jorge Ruesga <jorge@ruesga.com>