-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Am 2016-05-08 um 11:31 schrieb Aaryaman Vasishta:
> + /* d3drm intentionally leaks a reference to IDirect3DRM here if texture has already been initialized. */
> + if (texture->d3drm)
> + IDirect3DRM_AddRef(texture->d3drm);
> +
> + if (texture->image)
> + return D3DRMERR_BADOBJECT;
> + if (FAILED(hr = d3drm_texture_load(texture, filename, FALSE)))
> + return hr;
Does it also leak if the file fails to load? It's probably better to create the image and then pass it to InitFromImage instead of re-coding this part.
Is there any situation where texture->d3drm would be NULL? The same question applies to the newly introduced check in d3drm_texture_destroy.