VirtualBox

Changeset 28886 in vbox


Ignore:
Timestamp:
Apr 29, 2010 10:04:53 AM (15 years ago)
Author:
vboxsync
Message:

Main/linux/USB: don't call close(-1)

File:
1 edited

Legend:

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

    r28882 r28886  
    12461246    ~inotifyWatch(void)
    12471247    {
    1248         close(mhInotify);
     1248        if (mhInotify != -1)
     1249        {
     1250            close(mhInotify);
     1251            mhInotify = -1;
     1252        }
    12491253    }
    12501254
     
    14381442    /** This would probably be a pending segfault, so die cleanly */
    14391443    AssertRelease(!mfWaiting);
    1440     close(mhWakeupPipeR);
    1441     mhWakeupPipeR = -1;
    1442     close(mhWakeupPipeW);
    1443     mhWakeupPipeW = -1;
     1444    if (mhWakeupPipeR != -1)
     1445    {
     1446        close(mhWakeupPipeR);
     1447        mhWakeupPipeR = -1;
     1448    }
     1449    if (mhWakeupPipeW != -1)
     1450    {
     1451        close(mhWakeupPipeW);
     1452        mhWakeupPipeW = -1;
     1453    }
    14441454}
    14451455
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