VirtualBox

Changeset 24592 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 11, 2009 3:24:39 PM (15 years ago)
Author:
vboxsync
Message:

Main: fixed an uninitialized variable found by valgrind introduced with r50960.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/linux/NetIf-linux.cpp

    r23203 r24592  
    7777static int getInterfaceInfo(int iSocket, const char *pszName, PNETIFINFO pInfo)
    7878{
    79     // Zeroing out pInfo is a bad idea as it should contain both short and long names at this point.
    80     //memset(pInfo, 0, sizeof(*pInfo));
     79    // Zeroing out pInfo is a bad idea as it should contain both short and long names at
     80    // this point. So make sure the strucure is cleared by the caller if necessary!
     81    // memset(pInfo, 0, sizeof(*pInfo));
    8182    struct ifreq Req;
    8283    memset(&Req, 0, sizeof(Req));
     
    180181                char *pszName = buf+iFirstNonWS;
    181182                NETIFINFO Info;
     183                RT_ZERO(Info);
    182184                rc = getInterfaceInfo(sock, pszName, &Info);
    183185                if (RT_FAILURE(rc))
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