fix a memleak in DestroyContext()