VirtualBox

Changeset 4798 in vbox


Ignore:
Timestamp:
Sep 14, 2007 2:24:32 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
24500
Message:

fixed annoying debug assertion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r4640 r4798  
    102102
    103103    /** Handle for the shared object / DLL. */
    104     RTLDRMOD            pluginHandle;
     104    RTLDRMOD            hPlugin;
    105105    /** Function pointers for the various backend methods. */
    106106    PVBOXHDDBACKEND     Backend;
     
    494494    if (!pBackend)
    495495    {
    496         RTLDRMOD ldrHandle;
     496        RTLDRMOD hPlugin;
    497497        char *pszPluginName;
    498498        int cbPluginName;
     
    509509        {
    510510            /* try to load the plugin (RTldrLoad appends the suffix for the shared object/DLL). */
    511             rc = RTLdrLoad(pszPluginName, &ldrHandle);
     511            rc = RTLdrLoad(pszPluginName, &hPlugin);
    512512            if (VBOX_SUCCESS(rc))
    513513            {
    514514                PFNVBOXHDDFORMATLOAD pfnHDDFormatLoad;
    515515
    516                 rc = RTLdrGetSymbol (ldrHandle, VBOX_HDDFORMAT_LOAD_NAME, (void**)&pfnHDDFormatLoad);
    517                 if (VBOX_FAILURE(rc) || !pfnHDDFormatLoad)
     516                rc = RTLdrGetSymbol(hPlugin, VBOX_HDDFORMAT_LOAD_NAME, (void**)&pfnHDDFormatLoad);
     517                if (VBOX_FAILURE(rc))
    518518                {
    519519                    Log(("%s: Error resolving the entry point %s, rc = %d, pfnHDDFormat = %p\n", VBOX_HDDFORMAT_LOAD_NAME, rc, pfnHDDFormatLoad));
     
    561561            pDisk->pvErrorUser  = pvErrorUser;
    562562            pDisk->Backend      = pBackend;
     563            pDisk->hPlugin      = NIL_RTLDRMOD;
    563564            *ppDisk = pDisk;
    564565        }
     
    591592    {
    592593        VDCloseAll(pDisk);
    593         RTLdrClose(pDisk->pluginHandle);
     594        if (pDisk->hPlugin != NIL_RTLDRMOD)
     595        {
     596            RTLdrClose(pDisk->hPlugin);
     597            pDisk->hPlugin = NIL_RTLDRMOD;
     598        }
    594599        RTMemFree(pDisk->Backend);
    595600        RTMemFree(pDisk);
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