VirtualBox

Changeset 34413 in vbox


Ignore:
Timestamp:
Nov 26, 2010 5:01:23 PM (14 years ago)
Author:
vboxsync
Message:

vfsbase.cpp: RTVfs*Release - Ignore NIL handles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp

    r34410 r34413  
    397397{
    398398    RTVFSLOCKINTERNAL *pThis = hLock;
     399    if (pThis == NIL_RTVFSLOCK)
     400        return 0;
    399401    AssertPtrReturn(pThis, UINT32_MAX);
    400402    AssertReturn(pThis->enmType > RTVFSLOCKTYPE_INVALID && pThis->enmType < RTVFSLOCKTYPE_END, UINT32_MAX);
     
    875877{
    876878    RTVFSOBJINTERNAL *pThis = hVfsObj;
     879    if (pThis == NIL_RTVFSOBJ)
     880        return 0;
    877881    AssertPtrReturn(pThis, UINT32_MAX);
    878882    AssertReturn(pThis->uMagic == RTVFSOBJ_MAGIC, UINT32_MAX);
     
    16461650{
    16471651    RTVFSFSSTREAMINTERNAL *pThis = hVfsFss;
     1652    if (pThis == NIL_RTVFSFSSTREAM)
     1653        return 0;
    16481654    AssertPtrReturn(pThis, UINT32_MAX);
    16491655    AssertReturn(pThis->uMagic == RTVFSFSSTREAM_MAGIC, UINT32_MAX);
     
    17021708{
    17031709    RTVFSDIRINTERNAL *pThis = hVfsDir;
     1710    if (pThis == NIL_RTVFSDIR)
     1711        return 0;
    17041712    AssertPtrReturn(pThis, UINT32_MAX);
    17051713    AssertReturn(pThis->uMagic == RTVFSDIR_MAGIC, UINT32_MAX);
     
    17711779{
    17721780    RTVFSSYMLINKINTERNAL *pThis = hVfsSym;
     1781    if (pThis == NIL_RTVFSSYMLINK)
     1782        return 0;
    17731783    AssertPtrReturn(pThis, UINT32_MAX);
    17741784    AssertReturn(pThis->uMagic == RTVFSSYMLINK_MAGIC, UINT32_MAX);
     
    19141924{
    19151925    RTVFSIOSTREAMINTERNAL *pThis = hVfsIos;
     1926    if (pThis == NIL_RTVFSIOSTREAM)
     1927        return 0;
    19161928    AssertPtrReturn(pThis, UINT32_MAX);
    19171929    AssertReturn(pThis->uMagic == RTVFSIOSTREAM_MAGIC, UINT32_MAX);
     
    23512363{
    23522364    RTVFSFILEINTERNAL *pThis = hVfsFile;
     2365    if (pThis == NIL_RTVFSFILE)
     2366        return 0;
    23532367    AssertPtrReturn(pThis, UINT32_MAX);
    23542368    AssertReturn(pThis->uMagic == RTVFSFILE_MAGIC, UINT32_MAX);
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