mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
virBufferVSprintf: do not omit va_end(argptr) call
* src/util/buf.c (virBufferVSprintf): Do not omit va_end(argptr). Improved-by: Daniel Veillard.
This commit is contained in:
parent
14ee6a66f8
commit
72919f3d35
@ -245,12 +245,15 @@ virBufferVSprintf(const virBufferPtr buf, const char *format, ...)
|
||||
va_end(locarg);
|
||||
|
||||
grow_size = (count > 1000) ? count : 1000;
|
||||
if (virBufferGrow(buf, grow_size) < 0)
|
||||
if (virBufferGrow(buf, grow_size) < 0) {
|
||||
va_end(argptr);
|
||||
return;
|
||||
}
|
||||
|
||||
size = buf->size - buf->use - 1;
|
||||
va_copy(locarg, argptr);
|
||||
}
|
||||
va_end(argptr);
|
||||
va_end(locarg);
|
||||
buf->use += count;
|
||||
buf->content[buf->use] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user