Loading toolkit/xre/nsUpdateDriver.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -412,20 +412,20 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir, static void AppendToLibPath(const char *pathToAppend) { char *s = nullptr; char *pathValue = getenv(LD_LIBRARY_PATH_ENVVAR_NAME); if (nullptr == pathValue || '\0' == *pathValue) { s = PR_smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend); } else { s = PR_smprintf("%s=%s" PATH_SEPARATOR "%s", char *s = PR_smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend); PR_SetEnv(s); } else if (!strstr(pathValue, pathToAppend)) { char *s = PR_smprintf("%s=%s" PATH_SEPARATOR "%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend, pathValue); PR_SetEnv(s); } // The memory used by PR_SetEnv is not copied to the environment on all // platform, it can be used by reference directly. So we purposely do not // call PR_smprintf_free on s. Subsequent calls to PR_SetEnv will free // the old memory first. PR_SetEnv(s); } #endif Loading Loading
toolkit/xre/nsUpdateDriver.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -412,20 +412,20 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir, static void AppendToLibPath(const char *pathToAppend) { char *s = nullptr; char *pathValue = getenv(LD_LIBRARY_PATH_ENVVAR_NAME); if (nullptr == pathValue || '\0' == *pathValue) { s = PR_smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend); } else { s = PR_smprintf("%s=%s" PATH_SEPARATOR "%s", char *s = PR_smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend); PR_SetEnv(s); } else if (!strstr(pathValue, pathToAppend)) { char *s = PR_smprintf("%s=%s" PATH_SEPARATOR "%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend, pathValue); PR_SetEnv(s); } // The memory used by PR_SetEnv is not copied to the environment on all // platform, it can be used by reference directly. So we purposely do not // call PR_smprintf_free on s. Subsequent calls to PR_SetEnv will free // the old memory first. PR_SetEnv(s); } #endif Loading