cpml: fix access violation in cpml_segment_put_next