VirtualBox

Changeset 40623 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 26, 2012 3:21:50 AM (13 years ago)
Author:
vboxsync
Message:

NAT/libalias: better socket's reference count.

File:
1 edited

Legend:

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

    r40622 r40623  
    987987void slirpDeleteLinkSocket(void *pvLnk)
    988988{
    989         struct alias_link *lnk = (struct alias_link *)pvLnk;
     989    struct alias_link *lnk = (struct alias_link *)pvLnk;
     990    if (   lnk
     991        && lnk->pSo)
     992    {
     993        struct libalias *la = lnk->la;
     994        la->sockCount--;
    990995        lnk->pSo = NULL;
     996    }
    991997}
    992998#endif /* !VBOX */
     
    10331039    if (lnk->pSo)
    10341040    {
    1035         la->sockCount--;
     1041        /* libalias's sockCount decremented in slirpDeleteLinkSocket,
     1042         * which called from sofree
     1043         */
     1044        /* la->sockCount--; */
    10361045        /* should we be more smart, or it's enough to be
    10371046         * narrow-minded and just do sofree here
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