Fixed coverity issue 1047634

This commit is contained in:
Armin Novak 2013-08-28 15:53:50 +02:00
parent 82f0efd6e6
commit a55afb58a4

View File

@ -352,5 +352,11 @@ int ConvertFromUnicode(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int
if (status != cbMultiByte)
status = 0;
if ((status <= 0) && allocate)
{
free(*lpMultiByteStr);
*lpMultiByteStr = NULL;
}
return status;
}