reverting gibberish code I added earlier
reverting code I shouldn't need
fix Cycles breaking on free()

I may have to tweak this if in the end the result of the render is to be
rendered to a renderresult. If so I may pass width, height to the bake
function and set this as the 'scene' dimensions for the tiles.