VirtualBox

Changeset 43233 in vbox


Ignore:
Timestamp:
Sep 6, 2012 8:21:37 PM (12 years ago)
Author:
vboxsync
Message:

NAT: destroy really all memory in drvNATDestruct

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/misc.c

    r41807 r43233  
    538538    LogFlowFunc(("ENTER: zone:%R[mzone]\n", zone));
    539539    LogRel(("NAT: zone(nm:%s, used:%d)\n", zone->name, zone->cur_items));
    540     if (zone->master_zone)
    541         RTMemFree(zone->area);
     540    RTMemFree(zone->area);
    542541    RTCritSectLeave(&zone->csZone);
    543542    RTCritSectDelete(&zone->csZone);
     
    556555    ZONE_DESTROY(pData->zone_jumbo9);
    557556    ZONE_DESTROY(pData->zone_jumbo16);
     557    ZONE_DESTROY(pData->zone_ext_refcnt);
    558558# undef ZONE_DESTROY
    559559    /** @todo do finalize here.*/
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r42100 r43233  
    525525        RTMemFree(ac);
    526526    }
     527    slirpTftpTerm(pData);
    527528    bootp_dhcp_fini(pData);
    528529    m_fini(pData);
  • trunk/src/VBox/Devices/Network/slirp/tftp.c

    r42431 r43233  
    762762}
    763763
    764 DECLCALLBACK(int) slirpTftpInit(PNATState pData)
     764int slirpTftpInit(PNATState pData)
    765765{
    766766    AssertPtrReturn(pData, VERR_INVALID_PARAMETER);
     
    770770}
    771771
    772 DECLCALLBACK(int) slirpTftpInput(PNATState pData, struct mbuf *pMbuf)
     772void slirpTftpTerm(PNATState pData)
     773{
     774    RTMemFree(pData->pvTftpSessions);
     775}
     776
     777int slirpTftpInput(PNATState pData, struct mbuf *pMbuf)
    773778{
    774779    PTFTPIPHDR pTftpIpHeader = NULL;
  • trunk/src/VBox/Devices/Network/slirp/tftp.h

    r41987 r43233  
    3535
    3636
    37 int slirpTftpInput(PNATState pData, struct mbuf *m);
    38 int slirpTftpInit(PNATState);
     37int  slirpTftpInput(PNATState pData, struct mbuf *m);
     38int  slirpTftpInit(PNATState pData);
     39void slirpTftpTerm(PNATState pData);
    3940#endif
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