Fixes a leak when creating new image fails