From e5f6858cf5239d5f556adae1985e657771c340df Mon Sep 17 00:00:00 2001 From: Micke Prag Date: Thu, 22 Nov 2012 12:20:16 +0100 Subject: [PATCH] Cleanup our new environment after its use --- telldus-core/service/EventUpdateManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telldus-core/service/EventUpdateManager.cpp b/telldus-core/service/EventUpdateManager.cpp index f3ba28d8..6b83edcd 100644 --- a/telldus-core/service/EventUpdateManager.cpp +++ b/telldus-core/service/EventUpdateManager.cpp @@ -229,6 +229,10 @@ void EventUpdateManager::executeScripts(EventUpdateData *data) { for(StringList::iterator it = d->fileList[dir].begin(); it != d->fileList[dir].end(); ++it) { executeScript(TelldusCore::formatf("%s/%s/%s", SCRIPT_PATH, dir.c_str(), (*it).c_str()), (*it), newEnv); } + // Cleanup + for(int i = 0; newEnv[i] != 0; ++i) { + delete[] newEnv[i]; + } #endif // _LINUX }