ntdll: Fix missing unlock on error path. Found by Smatch.

This commit is contained in:
Michael Stefaniuc 2007-06-29 22:50:18 +02:00 committed by Alexandre Julliard
parent ef134dc703
commit bf6a96ca66
1 changed files with 5 additions and 1 deletions

View File

@ -1806,7 +1806,11 @@ NTSTATUS WINAPI LdrGetDllHandle( LPCWSTR load_path, ULONG flags, const UNICODE_S
if (filename != buffer) RtlFreeHeap( GetProcessHeap(), 0, filename );
if (status != STATUS_BUFFER_TOO_SMALL) break;
/* grow the buffer and retry */
if (!(filename = RtlAllocateHeap( GetProcessHeap(), 0, size ))) return STATUS_NO_MEMORY;
if (!(filename = RtlAllocateHeap( GetProcessHeap(), 0, size )))
{
status = STATUS_NO_MEMORY;
break;
}
}
if (status == STATUS_SUCCESS)