path variable no longer used, don't return without freeing the scratch buffer.