Patch from Scott McKellar which removes harmful use of osrf_clearbuf()