Changeset 65708 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Feb 9, 2017 4:53:09 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Bus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r65301 r65708 1389 1389 1390 1390 /** 1391 * @interface_method_impl{PDMDEVREG,pfnDestruct} 1392 */ 1393 static DECLCALLBACK(int) pciR3Destruct(PPDMDEVINS pDevIns) 1394 { 1395 PDEVPCIROOT pGlobals = PDMINS_2_DATA(pDevIns, PDEVPCIROOT); 1396 if (pGlobals->PciBus.papBridgesR3) 1397 { 1398 PDMDevHlpMMHeapFree(pDevIns, pGlobals->PciBus.papBridgesR3); 1399 pGlobals->PciBus.papBridgesR3 = NULL; 1400 } 1401 return VINF_SUCCESS; 1402 } 1403 1404 1405 /** 1391 1406 * The device registration structure. 1392 1407 */ … … 1414 1429 pciR3Construct, 1415 1430 /* pfnDestruct */ 1416 NULL,1431 pciR3Destruct, 1417 1432 /* pfnRelocate */ 1418 1433 devpciR3RootRelocate, … … 1704 1719 1705 1720 /** 1721 * @interface_method_impl{PDMDEVREG,pfnDestruct} 1722 */ 1723 static DECLCALLBACK(int) pcibridgeR3Destruct(PPDMDEVINS pDevIns) 1724 { 1725 PDEVPCIBUS pBus = PDMINS_2_DATA(pDevIns, PDEVPCIBUS); 1726 if (pBus->papBridgesR3) 1727 { 1728 PDMDevHlpMMHeapFree(pDevIns, pBus->papBridgesR3); 1729 pBus->papBridgesR3 = NULL; 1730 } 1731 return VINF_SUCCESS; 1732 } 1733 1734 1735 /** 1706 1736 * The device registration structure 1707 1737 * for the PCI-to-PCI bridge. … … 1730 1760 pcibridgeR3Construct, 1731 1761 /* pfnDestruct */ 1732 NULL,1762 pcibridgeR3Destruct, 1733 1763 /* pfnRelocate */ 1734 1764 devpciR3BusRelocate, -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r65648 r65708 2945 2945 2946 2946 2947 2947 /** 2948 * @interface_method_impl{PDMDEVREG,pfnConstruct} 2949 */ 2948 2950 static DECLCALLBACK(int) ich9pciConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 2949 2951 { … … 3145 3147 } 3146 3148 3149 3150 /** 3151 * @interface_method_impl{PDMDEVREG,pfnDestruct} 3152 */ 3153 static DECLCALLBACK(int) ich9pciDestruct(PPDMDEVINS pDevIns) 3154 { 3155 PDEVPCIROOT pPciRoot = PDMINS_2_DATA(pDevIns, PDEVPCIROOT); 3156 if (pPciRoot->PciBus.papBridgesR3) 3157 { 3158 PDMDevHlpMMHeapFree(pDevIns, pPciRoot->PciBus.papBridgesR3); 3159 pPciRoot->PciBus.papBridgesR3 = NULL; 3160 } 3161 return VINF_SUCCESS; 3162 } 3163 3164 3147 3165 static void ich9pciResetDevice(PPDMPCIDEV pDev) 3148 3166 { … … 3382 3400 3383 3401 /** 3402 * @interface_method_impl{PDMDEVREG,pfnDestruct} 3403 */ 3404 static DECLCALLBACK(int) ich9pcibridgeDestruct(PPDMDEVINS pDevIns) 3405 { 3406 PDEVPCIBUS pBus = PDMINS_2_DATA(pDevIns, PDEVPCIBUS); 3407 if (pBus->papBridgesR3) 3408 { 3409 PDMDevHlpMMHeapFree(pDevIns, pBus->papBridgesR3); 3410 pBus->papBridgesR3 = NULL; 3411 } 3412 return VINF_SUCCESS; 3413 } 3414 3415 /** 3384 3416 * @copydoc FNPDMDEVRESET 3385 3417 */ … … 3429 3461 ich9pciConstruct, 3430 3462 /* pfnDestruct */ 3431 NULL,3463 ich9pciDestruct, 3432 3464 /* pfnRelocate */ 3433 3465 devpciR3RootRelocate, … … 3485 3517 ich9pcibridgeConstruct, 3486 3518 /* pfnDestruct */ 3487 NULL,3519 ich9pcibridgeDestruct, 3488 3520 /* pfnRelocate */ 3489 3521 devpciR3BusRelocate,
Note:
See TracChangeset
for help on using the changeset viewer.