fix leaks due to missing invocations of va_end