Fix initialization bug in buffer.new_buffer()

The origin.type member of a newly allocated buffer needs to be set
explicitely after receiving a memory block with undefined contents
from malloc(3).