fix memory leak
authorYoung Ik Cho <youngik.cho@samsung.com>
Tue, 27 Aug 2013 11:21:17 +0000 (20:21 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Wed, 28 Aug 2013 00:06:52 +0000 (09:06 +0900)
Change-Id: If551e36719c423a5579874802cbd2af18b95b695
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
src/AppService.cpp
src/FApp_ConditionHandler.cpp
src/FApp_ConditionManagerStub.cpp
src/FShell_LockManagerStub.cpp
system-service-export.ver [changed mode: 0755->0644]

index 4229b3d..589a54c 100644 (file)
@@ -93,13 +93,6 @@ AppService::AppService()
        int pid = getpid();
        setpgid(pid, pid);
 
-       // uid change for rsa
-       if (getuid() != 0)
-       {
-               setuid(0);
-               setgid(0);
-       }
-
        InitializeIpc();
 
        SysLog(NID_APP, "Exit.");
index e574bab..3e67370 100644 (file)
@@ -265,6 +265,7 @@ _ConditionHandler::HasCondition(const AppId& appId, const String *pCondition) co
                if (pOperation->GetAppId() == appId
                        && ( pCondition == null || pOperation->GetConditionString() == *pCondition) )
                {
+                       delete pList;
                        return true;
                }
        }
index 53e314e..998aeb4 100644 (file)
@@ -62,6 +62,8 @@ _ConditionManagerStub::~_ConditionManagerStub()
                delete __pIpcServer;
        }
 
+       delete __pConditionManagerService;
+
        SysLog(NID_APP, "Exit\n");
 }
 
@@ -174,6 +176,10 @@ _ConditionManagerStub::OnInstallComplete(const AppId& appId )
                SysLog(NID_APP, "condition(%ls)", condition.GetPointer());
                __pConditionManagerService->RegisterAppLaunch(appId, condition, null, AppManager::LAUNCH_OPTION_DEFAULT, null);
        }
+
+       pArray->RemoveAll(true);
+       delete pArray;
+
        SysLog(NID_APP, "Exit");
 }
 
index c26e471..586360a 100644 (file)
@@ -58,6 +58,8 @@ _LockManagerStub::~_LockManagerStub()
                delete __pIpcServer;
        }
 
+       delete __pLockManagerService;
+
        SysLog(NID_APP, "_LockManagerStub - Exit\n");
 }
 
old mode 100755 (executable)
new mode 100644 (file)