VirtualBox

Changeset 61037 in vbox for trunk/src/VBox/Storage/ISCSI.cpp


Ignore:
Timestamp:
May 18, 2016 1:43:31 PM (9 years ago)
Author:
vboxsync
Message:

iSCSI: fix minor memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/ISCSI.cpp

    r58170 r61037  
    37713771            pImage->pszTargetName = NULL;
    37723772        }
     3773        if (pImage->pszTargetAddress)
     3774        {
     3775            RTMemFree(pImage->pszTargetAddress);
     3776            pImage->pszTargetAddress = NULL;
     3777        }
    37733778        if (pImage->pszInitiatorName)
    37743779        {
     
    38033808            RTMemFree(pImage->pvRecvPDUBuf);
    38043809            pImage->pvRecvPDUBuf = NULL;
     3810        }
     3811        if (pImage->pszHostname)
     3812        {
     3813            RTMemFree(pImage->pszHostname);
     3814            pImage->pszHostname = NULL;
    38053815        }
    38063816
     
    41794189    {
    41804190        LogRel(("iSCSI: Could not get LUN info for target %s, rc=%Rrc\n", pImage->pszTargetName, rc));
    4181         return rc;
     4191        goto out;
    41824192    }
    41834193
     
    45444554
    45454555out:
     4556    if (pszLUNInitial)
     4557        RTMemFree(pszLUNInitial);
    45464558    if (RT_FAILURE(rc))
    45474559        iscsiFreeImage(pImage, false);
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