VirtualBox

Changeset 58774 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Nov 19, 2015 4:01:30 PM (9 years ago)
Author:
vboxsync
Message:

dbgkrnlinfo-r0drv-solaris: check alloc failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/dbgkrnlinfo-r0drv-solaris.c

    r58772 r58774  
    269269    {
    270270        char *pszMod = RTStrDup(pszModule);
    271         int rc = rtR0DbgKrnlInfoModRetain(pszMod, &pMod, &pCtf);
    272         RTStrFree(pszMod);
    273         if (RT_FAILURE(rc))
    274             return VERR_MODULE_NOT_FOUND;
    275         AssertPtrReturn(pMod, VERR_INTERNAL_ERROR_5);
    276         AssertPtrReturn(pCtf, VERR_INTERNAL_ERROR_4);
     271        if (RT_LIKELY(pszMod))
     272        {
     273            int rc = rtR0DbgKrnlInfoModRetain(pszMod, &pMod, &pCtf);
     274            RTStrFree(pszMod);
     275            if (RT_FAILURE(rc))
     276                return VERR_MODULE_NOT_FOUND;
     277            AssertPtrReturn(pMod, VERR_INTERNAL_ERROR_5);
     278            AssertPtrReturn(pCtf, VERR_INTERNAL_ERROR_4);
     279        }
     280        else
     281            return VERR_NO_MEMORY;
    277282    }
    278283
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