mirror of
https://github.com/ONLYOFFICE/core.git
synced 2025-04-18 14:04:06 +03:00
Fix memory bug
This commit is contained in:
parent
c4bcf11d91
commit
1181cb222d
@ -181,33 +181,29 @@ namespace NSX2T
|
||||
|
||||
char** penv;
|
||||
#ifndef _MAC
|
||||
char* nenv[2];
|
||||
nenv[0] = &sLibraryDir[0];
|
||||
nenv[1] = NULL;
|
||||
penv = nenv;
|
||||
|
||||
if(bIsSaveEnvironment)
|
||||
{
|
||||
putenv(&sLibraryDir[0]);
|
||||
penv = environ;
|
||||
}
|
||||
else
|
||||
{
|
||||
char* nenv[2];
|
||||
nenv[0] = &sLibraryDir[0];
|
||||
nenv[1] = NULL;
|
||||
penv = nenv;
|
||||
}
|
||||
#else
|
||||
char* nenv[3];
|
||||
nenv[0] = &sLibraryDir[0];
|
||||
nenv[1] = &sPATH[0];
|
||||
nenv[2] = NULL;
|
||||
penv = nenv;
|
||||
|
||||
if(bIsSaveEnvironment)
|
||||
{
|
||||
putenv(&sLibraryDir[0]);
|
||||
putenv(&sPATH[0]);
|
||||
penv = environ;
|
||||
}
|
||||
else
|
||||
{
|
||||
char* nenv[3];
|
||||
nenv[0] = &sLibraryDir[0];
|
||||
nenv[1] = &sPATH[0];
|
||||
nenv[2] = NULL;
|
||||
penv = nenv;
|
||||
}
|
||||
#endif
|
||||
execve(sProgramm.c_str(),
|
||||
(char * const *)nargs,
|
||||
|
Loading…
x
Reference in New Issue
Block a user