BUG: set src->buffer = NULL after garbage collecting it in buffer_rd_…
Issue #12098

Add src->buffer = NULL; after garbage collecting src->buffer in the buffer_rd_bytes routine in io.c to fix the segfault
