mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Fix handle leaks in RtlCreateUserThread and SmExecPgm.
svn path=/trunk/; revision=34984
This commit is contained in:
@@ -265,6 +265,8 @@ SMAPI(SmExecPgm)
|
||||
DPRINT1("SM: %s: SmCreateClient failed (Status=0x%08lx)\n",
|
||||
__FUNCTION__, Status);
|
||||
}
|
||||
NtClose(ProcessInfo.ThreadHandle);
|
||||
NtClose(ProcessInfo.ProcessHandle);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -209,7 +209,10 @@ RtlCreateUserThread(IN HANDLE ProcessHandle,
|
||||
else
|
||||
{
|
||||
/* Return thread data */
|
||||
if (ThreadHandle) *ThreadHandle = Handle;
|
||||
if (ThreadHandle)
|
||||
*ThreadHandle = Handle;
|
||||
else
|
||||
NtClose(Handle);
|
||||
if (ClientId) *ClientId = ThreadCid;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user