[libvirt] PATCH: Convert buf.c to use memory alloc wrappers