Commit e25c6251 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

util: call va_end() after va_copy() (v2)

CID 157804 (#1 of 1): Missing varargs init or cleanup (VARARGS)
16. missing_va_end: va_end was not called for tmp.

v2: typo fix

Reported-by: Mr Coverity
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent ced5eeee
......@@ -76,6 +76,7 @@ static char *xvstrcat(char *str, const char *fmt, va_list args)
if (new) {
va_copy(tmp, args);
ret = vsnprintf(new + offset, delta, fmt, tmp);
va_end(tmp);
if (ret >= delta) {
/* NOTE: vsnprintf returns the amount of bytes
* to allocate. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment