ntdll: Fix missing unlock on error path. Found by Smatch.
Michael Stefaniuc
mstefani at redhat.de
Fri Jun 29 15:50:18 CDT 2007
---
dlls/ntdll/loader.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 2826d19..05f4d90 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -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 )))
+ {
+ RtlLeaveCriticalSection( &loader_section );
+ return STATUS_NO_MEMORY;
+ }
}
if (status == STATUS_SUCCESS)
--
1.5.0.6
--
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: mstefani at redhat.com
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070629/2014b0a0/attachment.pgp
More information about the wine-patches
mailing list