odbccp32: Fix memory leak in SQLGetInstalledDrivers() (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7d99d74572
commit
e034ba1b59
|
@ -572,7 +572,10 @@ BOOL WINAPI SQLGetInstalledDrivers(char *buf, WORD size, WORD *sizeout)
|
|||
|
||||
ret = SQLGetInstalledDriversW(wbuf, size, &written);
|
||||
if (!ret)
|
||||
{
|
||||
heap_free(wbuf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*sizeout = WideCharToMultiByte(CP_ACP, 0, wbuf, written, NULL, 0, NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, wbuf, written, buf, size, NULL, NULL);
|
||||
|
|
Loading…
Reference in New Issue