VirtualBox

Changeset 3391 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jul 3, 2007 2:10:47 PM (18 years ago)
Author:
vboxsync
Message:

Fixed slirp: a deallocated memory was accessed.

File:
1 edited

Legend:

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

    r1076 r3391  
    241241        int ret;
    242242/*      int ts_present = 0; */
     243        int mbuf_freed = 0;
    243244
    244245        DEBUG_CALL("tcp_input");
     
    13471348                len = so->so_rcv.sb_datalen - (tp->rcv_adv - tp->rcv_nxt);
    13481349        } else {
    1349                 m_free(pData, m);
     1350                mbuf_freed = 1; /* The mbuf must be freed, but only when its content is not needed anymore. */
    13501351                tiflags &= ~TH_FIN;
    13511352        }
     
    14341435        }
    14351436
     1437        if (mbuf_freed) {
     1438                m_free(pData, m);
     1439        }
    14361440        /*
    14371441         * Return any desired output.
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