Fix possible memory leak.