fix memory leak
authorYoungjae Shin <yj99.shin@samsung.com>
Fri, 26 Jun 2020 05:19:48 +0000 (14:19 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Mon, 6 Jul 2020 01:23:43 +0000 (10:23 +0900)
Change-Id: I0e7b71dc1ec14e9cd12e9af618cd2e91ff1dc1d4

supervisor/RequestHandler.cpp

index 77ed2232d93a83ffed4af06120cb4ffea4291e4c..4fba690e835a6542196dc46c0471d4e8a2503bf7 100644 (file)
@@ -203,6 +203,10 @@ Mode RequestHandler::getModefromData(GVariant *inData)
                ERR("createAction(%s, %s, %s) Fail(%s)", id, actName, value, e.what());
                g_variant_iter_free(iter);
                g_variant_unref(actionList);
+               //g_variant_iter_loop() need to free at breaking out of this loop
+               free(id);
+               free(actName);
+               free(value);
                throw ModesEx(ModesEx::INVALID_ARG, "Action is null!");
        }
        g_variant_iter_free(iter);