json: Fix a memleak in parse_pair()