diff --git a/dlls/kernel32/file16.c b/dlls/kernel32/file16.c index 30c7bdd8163..e4f703daa6e 100644 --- a/dlls/kernel32/file16.c +++ b/dlls/kernel32/file16.c @@ -555,6 +555,7 @@ INT16 WINAPI GetPrivateProfileString16( LPCSTR section, LPCSTR entry, ret = GetPrivateProfileSectionA( section, data, size, filename ); if (!ret) { + if (len) *buffer = 0; HeapFree( GetProcessHeap(), 0, data ); return 0; }