Fix memory leak when rendering images as HTML
Merge pull request #132 from JordanMilne/fix_render_leak

Fix memory leak when rendering images as HTML