r65: fixed a memory leak