Most other buffer APIs tolerate the buffer being NULL. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/util/virbuffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c index 1a6bf122e0..3d6defb73a 100644 --- a/src/util/virbuffer.c +++ b/src/util/virbuffer.c @@ -883,6 +883,9 @@ virBufferStrcat(virBufferPtr buf, ...) { va_list ap; + if (!buf) + return; + va_start(ap, buf); virBufferStrcatVArgs(buf, ap); va_end(ap); -- 2.16.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list