Fix memory leak in `json_fetch`.