Fix memory leak.