json-streamer: fix double-free on exiting during a parse