Commit 11c2ec34 authored by benm@google.com's avatar benm@google.com
Browse files

Fixes a leak in createThreadInternal on Android.

https://bugs.webkit.org/show_bug.cgi?id=30698

Patch by Steve Block <steveblock@google.com> on 2009-10-23
Reviewed by Dmitry Titov.

* wtf/ThreadingPthreads.cpp: Modified.
(WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3f2909f5
2009-10-23 Steve Block <steveblock@google.com>
Reviewed by Dmitry Titov.
Fixes a leak in createThreadInternal on Android.
https://bugs.webkit.org/show_bug.cgi?id=30698
* wtf/ThreadingPthreads.cpp: Modified.
(WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
2009-10-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by Alexey Proskuryakov.
......
......@@ -167,6 +167,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
if (pthread_create(&threadHandle, 0, runThreadWithRegistration, static_cast<void*>(threadData))) {
LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data);
delete threadData;
return 0;
}
return establishIdentifierForPthreadHandle(threadHandle);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment