VirtualBox

Changeset 28633 in vbox


Ignore:
Timestamp:
Apr 23, 2010 9:16:35 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60485
Message:

Solaris/r0drv: RTSemMutex fix ref counting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/semmutex-r0drv-solaris.c

    r28551 r28633  
    220220             */
    221221            rc = VERR_SEM_DESTROYED;
    222             if (!ASMAtomicDecU32(&pThis->cRefs))
    223             {
    224                 mutex_exit(&pThis->Mtx);
    225                 cv_destroy(&pThis->Cnd);
    226                 mutex_destroy(&pThis->Mtx);
    227                 RTMemFree(pThis);
    228                 return rc;
    229             }
    230222        }
    231223    }
     
    243235         */
    244236        rc = VERR_INTERRUPTED;
     237    }
     238
     239    if (!ASMAtomicDecU32(&pThis->cRefs))
     240    {
     241        Assert(RT_FAILURE_NP(rc));
     242        mutex_exit(&pThis->Mtx);
     243        cv_destroy(&pThis->Cnd);
     244        mutex_destroy(&pThis->Mtx);
     245        RTMemFree(pThis);
     246        return rc;
    245247    }
    246248
Note: See TracChangeset for help on using the changeset viewer.

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