projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7049d7
)
[SERVICES]
author
Eric Kohl
<eric.kohl@reactos.org>
Mon, 7 Mar 2011 20:25:28 +0000
(20:25 +0000)
committer
Eric Kohl
<eric.kohl@reactos.org>
Mon, 7 Mar 2011 20:25:28 +0000
(20:25 +0000)
Leave the critical section when the allocation of the control packet fails.
Bug spotted by hzlilx.
svn path=/trunk/; revision=50994
reactos/base/system/services/database.c
patch
|
blob
|
history
diff --git
a/reactos/base/system/services/database.c
b/reactos/base/system/services/database.c
index
f33d437
..
02afda3
100644
(file)
--- a/
reactos/base/system/services/database.c
+++ b/
reactos/base/system/services/database.c
@@
-700,7
+700,10
@@
ScmControlService(PSERVICE Service,
HEAP_ZERO_MEMORY,
sizeof(SCM_CONTROL_PACKET) + (TotalLength * sizeof(WCHAR)));
if (ControlPacket == NULL)
+ {
+ LeaveCriticalSection(&ControlServiceCriticalSection);
return ERROR_NOT_ENOUGH_MEMORY;
+ }
ControlPacket->dwControl = dwControl;
ControlPacket->dwSize = TotalLength;