VirtualBox

Changeset 18860 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 10, 2009 9:06:05 AM (16 years ago)
Author:
vboxsync
Message:

IOM: Make the MMIO description string unique.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/IOM.cpp

    r17332 r18860  
    13881388
    13891389    /*
     1390     * For the 2nd+ instance, mangle the description string so it's unique.
     1391     * (PGM requires this.)
     1392     */
     1393    if (pDevIns->iInstance > 0)
     1394    {
     1395        pszDesc = MMR3HeapAPrintf(pVM, MM_TAG_IOM, "%s [%u]", pszDesc, pDevIns->iInstance);
     1396        if (!pszDesc)
     1397            return VERR_NO_MEMORY;
     1398    }
     1399
     1400
     1401    /*
    13901402     * Allocate new range record and initialize it.
    13911403     */
     
    14301442                return VINF_SUCCESS;
    14311443
     1444            /* bail out */
    14321445            DBGFR3Info(pVM, "mmio", NULL, NULL);
    14331446            AssertMsgFailed(("This cannot happen!\n"));
     
    14361449        MMHyperFree(pVM, pRange);
    14371450    }
    1438 
     1451    if (pDevIns->iInstance > 0)
     1452        MMR3HeapFree((void *)pszDesc);
    14391453    return rc;
    14401454}
     
    16141628        /* advance and free. */
    16151629        GCPhys = pRange->Core.KeyLast + 1;
     1630        if (pDevIns->iInstance > 0)
     1631            MMR3HeapFree((void *)pRange->pszDesc);
    16161632        MMHyperFree(pVM, pRange);
    16171633    }
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