VirtualBox

Ignore:
Timestamp:
Feb 20, 2017 11:55:55 AM (8 years ago)
Author:
vboxsync
Message:

NetworkServices/VBoxNetLwipNAT: properly free the list of name servers on termination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp

    r64759 r65809  
    689689VBoxNetLwipNAT::~VBoxNetLwipNAT()
    690690{
    691     if (m_ProxyOptions.tftp_root != NULL)
     691    if (m_ProxyOptions.tftp_root)
    692692    {
    693693        RTStrFree((char *)m_ProxyOptions.tftp_root);
     694        m_ProxyOptions.tftp_root = NULL;
     695    }
     696    if (m_ProxyOptions.nameservers)
     697    {
     698        const char **pv = m_ProxyOptions.nameservers;
     699        while (*pv)
     700        {
     701            RTStrFree((char*)*pv);
     702            pv++;
     703        }
     704        RTMemFree(m_ProxyOptions.nameservers);
     705        m_ProxyOptions.nameservers = NULL;
    694706    }
    695707}
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