Fixed a memory leak with filename comparisons when loading textures.