util: buffer: Tolerate NULL 'buf' in virBufferStrcat

Most other buffer APIs tolerate the buffer being NULL.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Peter Krempa 2018-03-22 13:10:40 +01:00
parent 3f9e02b40a
commit 9be9e26b74

View File

@ -883,6 +883,9 @@ virBufferStrcat(virBufferPtr buf, ...)
{
va_list ap;
if (!buf)
return;
va_start(ap, buf);
virBufferStrcatVArgs(buf, ap);
va_end(ap);