ja: fix a memory leak on truncate