mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 18:02:05 +00:00
can't free non-allocated memory
svn path=/trunk/; revision=11873
This commit is contained in:
parent
bcf7f5403f
commit
00641f6f5b
1 changed files with 1 additions and 3 deletions
|
@ -656,7 +656,6 @@ GetCPFileNameFromRegistry(UINT CodePage, LPWSTR FileName, ULONG FileNameSize)
|
|||
Status = NtOpenKey(&KeyHandle, KEY_READ, &ObjectAttributes);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
RtlFreeUnicodeString(&ValueName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -667,14 +666,13 @@ GetCPFileNameFromRegistry(UINT CodePage, LPWSTR FileName, ULONG FileNameSize)
|
|||
if (Kvpi == NULL)
|
||||
{
|
||||
NtClose(KeyHandle);
|
||||
RtlFreeUnicodeString(&ValueName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Query the file name for our code page. */
|
||||
Status = NtQueryValueKey(KeyHandle, &ValueName, KeyValuePartialInformation,
|
||||
Kvpi, KvpiSize, &KvpiSize);
|
||||
RtlFreeUnicodeString(&ValueName);
|
||||
|
||||
NtClose(KeyHandle);
|
||||
|
||||
/* Check if we succeded and the value is non-empty string. */
|
||||
|
|
Loading…
Reference in a new issue