projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77a3c0c
)
Fixed use after free.
author
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 14:21:13 +0000
(15:21 +0100)
committer
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 14:21:13 +0000
(15:21 +0100)
winpr/libwinpr/thread/thread.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/thread/thread.c
b/winpr/libwinpr/thread/thread.c
index
da9d86b
..
8916f22
100644
(file)
--- a/
winpr/libwinpr/thread/thread.c
+++ b/
winpr/libwinpr/thread/thread.c
@@
-426,6
+426,7
@@
HANDLE CreateRemoteThread(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttribu
VOID ExitThread(DWORD dwExitCode)
{
+ DWORD rc;
pthread_t tid = pthread_self();
if (!thread_list)
@@
-460,10
+461,11
@@
VOID ExitThread(DWORD dwExitCode)
ListDictionary_Unlock(thread_list);
set_event(thread);
+ rc = thread->dwExitCode;
if (thread->detached || !thread->started)
cleanup_handle(thread);
- pthread_exit((void*) (size_t)
thread->dwExitCode
);
+ pthread_exit((void*) (size_t)
rc
);
}
}