VirtualBox

Changeset 31961 in vbox for trunk


Ignore:
Timestamp:
Aug 25, 2010 2:02:32 PM (14 years ago)
Author:
vboxsync
Message:

rtStrConvertWrapper: Release the thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/utf8-posix.cpp

    r31157 r31961  
    372372    {
    373373        PRTTHREADINT pThread = rtThreadGet(hSelf);
    374         if (   pThread
    375             && (pThread->fIntFlags & (RTTHREADINT_FLAGS_ALIEN | RTTHREADINT_FLAGS_MAIN)) != RTTHREADINT_FLAGS_ALIEN)
    376             return rtstrConvertCached(pchInput, cchInput, pszInputCS,
    377                                       (void **)ppszOutput, cbOutput, pszOutputCS,
    378                                       cFactor, (iconv_t *)&pThread->ahIconvs[enmCacheIdx]);
     374        if (pThread)
     375        {
     376            if ((pThread->fIntFlags & (RTTHREADINT_FLAGS_ALIEN | RTTHREADINT_FLAGS_MAIN)) != RTTHREADINT_FLAGS_ALIEN)
     377            {
     378                int rc = rtstrConvertCached(pchInput, cchInput, pszInputCS,
     379                                            (void **)ppszOutput, cbOutput, pszOutputCS,
     380                                            cFactor, (iconv_t *)&pThread->ahIconvs[enmCacheIdx]);
     381                rtThreadRelease(pThread);
     382                return rc;
     383            }
     384            rtThreadRelease(pThread);
     385        }
    379386    }
    380387#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette