On 11 May 2016 at 17:50, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
If CreateTexture fails because of an invalid image, it doesn't leak a reference to d3drm, unlike the InitFrom* calls. So I had to either do this, or explicitly release texture->d3drm if InitFromImage fails.
That's not what the implementation in patch 2/6 does. It will leak if the texture is already initialised, but not when d3drm_validate_image() fails.