Fix possible double-free in GLLoadImage