fix (stream|session)_free