mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 09:29:52 +03:00
Merge PR #636: fix several issues found by coverity
This commit is contained in:
commit
6764e24f20
@ -462,7 +462,7 @@ void DCThread(THREAD *thread, void *param)
|
||||
|
||||
if (n == 1)
|
||||
{
|
||||
interval = MIN(interval, 0);
|
||||
interval = 0;
|
||||
}
|
||||
|
||||
if (c->Halt)
|
||||
|
@ -1366,10 +1366,6 @@ void CfgAddItemText(BUF *b, ITEM *t, UINT depth)
|
||||
|
||||
// Memory release
|
||||
Free(data);
|
||||
if (sub != NULL)
|
||||
{
|
||||
Free(sub);
|
||||
}
|
||||
}
|
||||
|
||||
// Output the data line
|
||||
|
@ -1912,7 +1912,9 @@ void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
|
||||
UNI_TOKEN_LIST *t;
|
||||
bool first_double_slash = false;
|
||||
bool first_single_slash = false;
|
||||
#ifdef OS_WIN32
|
||||
wchar_t win32_drive_char = 0;
|
||||
#endif // OS_WIN32
|
||||
bool is_full_path = false;
|
||||
UINT i;
|
||||
SK *sk;
|
||||
@ -2036,6 +2038,7 @@ void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
|
||||
UniStrCat(tmp, sizeof(tmp), L"/");
|
||||
}
|
||||
|
||||
#ifdef OS_WIN32
|
||||
if (win32_drive_char != 0)
|
||||
{
|
||||
wchar_t d[2];
|
||||
@ -2044,6 +2047,7 @@ void NormalizePathW(wchar_t *dst, UINT size, wchar_t *src)
|
||||
UniStrCat(tmp, sizeof(tmp), d);
|
||||
UniStrCat(tmp, sizeof(tmp), L":/");
|
||||
}
|
||||
#endif // OS_WIN32
|
||||
|
||||
for (i = 0;i < sk->num_item;i++)
|
||||
{
|
||||
|
@ -663,17 +663,15 @@ LIST *GetNicList()
|
||||
|
||||
#ifdef OS_WIN32
|
||||
o = Win32GetNicList();
|
||||
#endif // OS_WIN32
|
||||
|
||||
#ifdef UNIX_LINUX
|
||||
#endif // UNIX_LINUX
|
||||
|
||||
if (o == NULL)
|
||||
if (o != NULL)
|
||||
{
|
||||
return NewListFast(NULL);
|
||||
return o;
|
||||
}
|
||||
|
||||
return o;
|
||||
#endif // OS_WIN32
|
||||
|
||||
return NewListFast(NULL);
|
||||
}
|
||||
|
||||
#ifdef OS_WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user