VirtualBox

Changeset 24102 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 27, 2009 12:07:44 AM (15 years ago)
Author:
vboxsync
Message:

req.cpp: oops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/req.cpp

    r24100 r24102  
    6161RTDECL(int) RTReqCreateQueue(PRTREQQUEUE *ppQueue)
    6262{
    63     *ppQueue = (PRTREQQUEUE)RTMemAllocZ(sizeof(RTREQQUEUE));
    64     if (!ppQueue)
     63    PRTREQQUEUE pQueue = (PRTREQQUEUE)RTMemAllocZ(sizeof(RTREQQUEUE));
     64    if (!pQueue)
    6565        return VERR_NO_MEMORY;
    66 
    67     int rc = RTSemEventCreate(&(*ppQueue)->EventSem);
     66    int rc = RTSemEventCreate(&pQueue->EventSem);
    6867    if (RT_SUCCESS(rc))
    69         RTMemFree(*ppQueue);
    70 
     68    {
     69        *ppQueue = pQueue;
     70        return VINF_SUCCESS;
     71    }
     72
     73    RTMemFree(*ppQueue);
    7174    return rc;
    7275}
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