mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Fix handle leaks in RtlCreateUserThread and SmExecPgm.
svn path=/trunk/; revision=34984
This commit is contained in:
parent
ffad542df1
commit
717a13e2d7
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue