resourceservice/resourceservice.c : enhancement 15/203315/1
authorjaehoon.hyun <jaehoon.hyun@samsung.com>
Thu, 11 Apr 2019 11:39:43 +0000 (20:39 +0900)
committerjaehoon.hyun <jaehoon.hyun@samsung.com>
Thu, 11 Apr 2019 11:39:43 +0000 (20:39 +0900)
resource free

Change-Id: Iaaccc2b54d8545d9d282025c3b9d74ec8f95232e

src/scoringmgr/resourceservice/resourceservice.c

index efcfdd4..7359393 100644 (file)
@@ -258,9 +258,13 @@ static double getNetworkBandwidth()
                 count++;\r
 \r
             }\r
+\r
+            close(sock);\r
         }\r
     }\r
 \r
+    freeifaddrs(ifap);\r
+\r
     return total / count;\r
 #else\r
 #error "Not Support this architecture"\r
@@ -486,7 +490,7 @@ void startResourceService()
 \r
     pthread_create(&cpuUsageThread.t, NULL, daemonCpuUsage, NULL);\r
     pthread_create(&networkUsageThread.t, NULL, daemonNetworkUsage, NULL);\r
-    pthread_create(&diskUsageThread.t, NULL, daemonDiskUsage, NULL);\r
+    // pthread_create(&diskUsageThread.t, NULL, daemonDiskUsage, NULL);\r
 }\r
 \r
 void stopResourceService()\r
@@ -504,7 +508,7 @@ void stopResourceService()
 \r
     pthread_detach(cpuUsageThread.t);\r
     pthread_detach(networkUsageThread.t);\r
-    pthread_detach(diskUsageThread.t);\r
+    // pthread_detach(diskUsageThread.t);\r
 \r
     printf("stopResourceService end\n");\r
 }\r