q2: fix double free