Fix a small memory leak
Fix another small leak in D3D