write_prometheus: plug a small leak