mirror of https://github.com/OpenVPN/openvpn-gui
Add missing va_end() in MsgToEventLog()
Found by cppcheck Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/299/head
parent
ad1640d56d
commit
6ad90b92a1
7
main.c
7
main.c
|
@ -871,8 +871,11 @@ MsgToEventLog(WORD type, wchar_t *format, ...)
|
|||
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
if (vswprintf(buf, size-1, format, args) == -1)
|
||||
return;
|
||||
int nchar = vswprintf(buf, size-1, format, args);
|
||||
va_end(args);
|
||||
|
||||
if (nchar == -1) return;
|
||||
|
||||
buf[size - 1] = '\0';
|
||||
|
||||
msg[0] = TEXT(PACKAGE_NAME);
|
||||
|
|
Loading…
Reference in New Issue