VirtualBox

Changeset 54052 in vbox


Ignore:
Timestamp:
Jan 30, 2015 5:40:09 PM (10 years ago)
Author:
vboxsync
Message:

Storage/VSCSI: small leak in error path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunSbc.cpp

    r47829 r54052  
    497497                    if (cBlkDesc)
    498498                    {
    499                         PRTRANGE paRanges;
    500 
    501                         paRanges = (PRTRANGE)RTMemAllocZ(cBlkDesc * sizeof(RTRANGE));
     499                        PRTRANGE paRanges = (PRTRANGE)RTMemAllocZ(cBlkDesc * sizeof(RTRANGE));
    502500                        if (paRanges)
    503501                        {
     
    519517                            if (rcReq == SCSI_STATUS_OK)
    520518                                rc = vscsiIoReqUnmapEnqueue(pVScsiLun, pVScsiReq, paRanges, cBlkDesc);
     519                            if (   rcReq != SCSI_STATUS_OK
     520                                || RT_FAILURE(rc))
     521                                RTMemFree(paRanges);
    521522                        }
    522523                        else /* Out of memory. */
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