VirtualBox

Ignore:
Timestamp:
May 17, 2019 11:36:45 AM (6 years ago)
Author:
vboxsync
Message:

winnt/vboxsf: Must initialize IPRT. Duh! bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/vbsf.cpp

    r78382 r78562  
    2121*********************************************************************************************************************************/
    2222#include "vbsf.h"
     23#include <iprt/initterm.h>
    2324
    2425
     
    146147    VbglR0SfTerm();
    147148
    148     Log(("VBOXSF: MRxUnload: VBoxSF.sys driver object %p unloaded\n", DriverObject));
     149    Log(("VBOXSF: MRxUnload: VBoxSF.sys driver object %p almost unloaded, just RTR0Term left...\n", DriverObject));
     150    RTR0Term(); /* No logging after this. */
    149151}
    150152
     
    609611    }
    610612
     613    /*
     614     * Initialize IPRT.
     615     */
     616    vrc = RTR0Init(0);
     617    if (RT_FAILURE(vrc))
     618    {
     619        Log(("VBOXSF: DriverEntry: RTR0Init failed! %Rrc!\n", vrc));
     620        return STATUS_UNSUCCESSFUL;
     621    }
     622
    611623    /* Initialize VBox subsystem. */
    612624    vrc = VbglR0SfInit();
     
    614626    {
    615627        Log(("VBOXSF: DriverEntry: ERROR while initializing VBox subsystem (%Rrc)!\n", vrc));
     628        RTR0Term();
    616629        return STATUS_UNSUCCESSFUL;
    617630    }
     
    624637             vrc));
    625638        VbglR0SfTerm();
     639        RTR0Term();
    626640        return STATUS_UNSUCCESSFUL;
    627641    }
     
    769783    VbglR0SfDisconnect(&g_SfClient);
    770784    VbglR0SfTerm();
     785    RTR0Term();
    771786
    772787    if (VBoxMRxDeviceObject)
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