wined3d: Fix a memory leak (spotted by Eric Pouech).