Ignore:
Timestamp:
Oct 23, 2009, 7:07:39 AM (16 years ago)
Author:
[email protected]
Message:

Fixes a leak in createThreadInternal on Android.
https://bugs.webkit.org/show_bug.cgi?id=30698

Patch by Steve Block <[email protected]> on 2009-10-23
Reviewed by Dmitry Titov.

  • wtf/ThreadingPthreads.cpp: Modified.

(WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/ThreadingPthreads.cpp

    r48733 r49977  
    168168    if (pthread_create(&threadHandle, 0, runThreadWithRegistration, static_cast<void*>(threadData))) {
    169169        LOG_ERROR("Failed to create pthread at entry point %p with data %p", entryPoint, data);
     170        delete threadData;
    170171        return 0;
    171172    }
Note: See TracChangeset for help on using the changeset viewer.