Commit e034ba1b authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

odbccp32: Fix memory leak in SQLGetInstalledDrivers() (Coverity).

parent 7d99d745
...@@ -572,7 +572,10 @@ BOOL WINAPI SQLGetInstalledDrivers(char *buf, WORD size, WORD *sizeout) ...@@ -572,7 +572,10 @@ BOOL WINAPI SQLGetInstalledDrivers(char *buf, WORD size, WORD *sizeout)
ret = SQLGetInstalledDriversW(wbuf, size, &written); ret = SQLGetInstalledDriversW(wbuf, size, &written);
if (!ret) if (!ret)
{
heap_free(wbuf);
return FALSE; return FALSE;
}
*sizeout = WideCharToMultiByte(CP_ACP, 0, wbuf, written, NULL, 0, NULL, NULL); *sizeout = WideCharToMultiByte(CP_ACP, 0, wbuf, written, NULL, 0, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, wbuf, written, buf, size, NULL, NULL); WideCharToMultiByte(CP_ACP, 0, wbuf, written, buf, size, NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment