VirtualBox

Changeset 48722 in vbox


Ignore:
Timestamp:
Sep 27, 2013 8:01:03 AM (11 years ago)
Author:
vboxsync
Message:

VBoxService/VBoxServiceControlSession: Close guest file on opening error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r48720 r48722  
    154154    if (RT_SUCCESS(rc))
    155155    {
    156         PVBOXSERVICECTRLFILE pFile = (PVBOXSERVICECTRLFILE)RTMemAlloc(sizeof(VBOXSERVICECTRLFILE));
     156        PVBOXSERVICECTRLFILE pFile = (PVBOXSERVICECTRLFILE)RTMemAllocZ(sizeof(VBOXSERVICECTRLFILE));
    157157        if (pFile)
    158158        {
     
    199199
    200200            if (RT_FAILURE(rc))
     201            {
     202                if (pFile->hFile)
     203                    RTFileClose(pFile->hFile);
    201204                RTMemFree(pFile);
     205            }
    202206        }
    203207        else
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