session: fix use-after-free in input node

No match.