VirtualBox

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


Ignore:
Timestamp:
Apr 19, 2010 7:41:36 AM (15 years ago)
Author:
vboxsync
Message:

NAT: tcp_close filter out listening sockets while freeing socket buffers, where we don't allocate socket buffers.
sofree asserts if sbuf is already freed (freed and assigned with NULL value) or NULL.

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

Legend:

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

    r28274 r28444  
    1919sbfree(struct sbuf *sb)
    2020{
     21    /*
     22     * vvl: This assert to catch double frees. tcp_close filter out
     23     * listening sockets which pass NULLs here.   
     24     */
     25    Assert((sb->sb_data));
    2126    RTMemFree(sb->sb_data);
    2227    /** @todo bird: I'm seeing double frees here sometimes.  This NULL'ing is just a
  • trunk/src/VBox/Devices/Network/slirp/tcp_subr.c

    r28434 r28444  
    289289        tcp_last_so = &tcb;
    290290    closesocket(so->s);
    291     sbfree(&so->so_rcv);
    292     sbfree(&so->so_snd);
     291    /* (vvl) opening listening socket we do not reserve sbufs for it */
     292    if ((so->so_state & SS_FACCEPTCONN) == 0)
     293    {
     294        sbfree(&so->so_rcv);
     295        sbfree(&so->so_snd);
     296    }
    293297    sofree(pData, so);
    294298    SOCKET_UNLOCK(so);
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