fix memory corruption caused by use-after-free

No match.