Trivial simplification, we don't need a local variable.
Don't ignore error return from WT_CURSOR.close (it might be a panic).