VirtualBox

Changeset 7596 in vbox


Ignore:
Timestamp:
Mar 27, 2008 3:36:37 PM (17 years ago)
Author:
vboxsync
Message:

Dynamic memory allocation for the path variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r7594 r7596  
    31613161    if (type == "gui")
    31623162    {
    3163         char VirtualBox_exe[sz];
     3163        char *VirtualBox_exe = (char *) RTMemAlloc (sz);
    31643164        size_t cchActual;
    31653165        vrc = RTEnvGetEx (env, "VBOXGUIPATH", VirtualBox_exe, sz, &cchActual);
    3166         AssertRCBreakVoid (vrc);
     3166        AssertRCBreak (vrc, RTStrFree (VirtualBox_exe));
    31673167        strcpy (cmd, VirtualBox_exe);
    31683168
     
    31753175#endif
    31763176        vrc = RTProcCreate (path, args, env, 0, &pid);
     3177        RTStrFree (VirtualBox_exe);
    31773178    }
    31783179    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