Commit c827e3f6 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Fix handling of NULL argument in SetDllDirectoryA().

parent a07960b9
......@@ -129,10 +129,10 @@ DWORD WINAPI GetDllDirectoryW( DWORD buf_len, LPWSTR buffer )
*/
BOOL WINAPI SetDllDirectoryA( LPCSTR dir )
{
WCHAR *dirW;
WCHAR *dirW = NULL;
BOOL ret;
if (!(dirW = FILE_name_AtoW( dir, TRUE ))) return FALSE;
if (dir && !(dirW = FILE_name_AtoW( dir, TRUE ))) return FALSE;
ret = SetDllDirectoryW( dirW );
HeapFree( GetProcessHeap(), 0, dirW );
return ret;
......
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