VirtualBox

Changeset 43752 in vbox


Ignore:
Timestamp:
Oct 26, 2012 8:19:41 AM (12 years ago)
Author:
vboxsync
Message:

NAT: don't free socket with alive tcb.

File:
1 edited

Legend:

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

    r41855 r43752  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2012 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    11381138        int tmperrno = errno; /* Don't clobber the real reason we failed */
    11391139        close(s);
    1140         QSOCKET_LOCK(tcb);
    1141         sofree(pData, so);
    1142         QSOCKET_UNLOCK(tcb);
     1140        if (sototcpcb(so))
     1141            tcp_close(pData, sototcpcb(so));
     1142        else
     1143            sofree(pData, so);
    11431144        /* Restore the real errno */
    11441145        errno = tmperrno;
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