VirtualBox

Changeset 27565 in vbox for trunk/src


Ignore:
Timestamp:
Mar 21, 2010 11:26:10 PM (15 years ago)
Author:
vboxsync
Message:

DrvNAT.cpp: Fixed cleanup bug in drvNATDestruct where it would crash if drvNATConstrct failed early on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r26574 r27565  
    988988    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
    989989
    990     slirp_term(pThis->pNATState);
    991     slirp_deregister_statistics(pThis->pNATState, pDrvIns);
    992     pThis->pNATState = NULL;
     990    if (pThis->pNATState)
     991    {
     992        slirp_term(pThis->pNATState);
     993        slirp_deregister_statistics(pThis->pNATState, pDrvIns);
    993994#ifdef VBOX_WITH_STATISTICS
    994995# define DRV_PROFILE_COUNTER(name, dsc)     DEREGISTER_COUNTER(name, pThis)
     
    996997# include "counters.h"
    997998#endif
     999        pThis->pNATState = NULL;
     1000    }
    9981001}
    9991002
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