find bug for memleak when read/write variable header