avoid attempting to modify unallocated sbuf

previously, when using sbuf_t::map_file, the should_close flag was always set
on the newly-allocated sbuf even if the allocation had failed