From: Seungha Son Date: Fri, 18 Aug 2017 04:47:30 +0000 (+0900) Subject: Fix memory leak X-Git-Tag: accepted/tizen/4.0/unified/20170828.223934~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce5f401ef0eb5c84ffbe33f3adb208ca614cae7f;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Fix memory leak Signed-off-by: Seungha Son Change-Id: Ic777cdeb6517bc87e56d1671cd810edf8babbf5c --- diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index a9e3ca1..fbdfb4b 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -32,6 +32,7 @@ #include #include +#include #include @@ -414,6 +415,7 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) { icon_x* app_icon = reinterpret_cast(calloc(1, sizeof(icon_x))); if (!app_icon) { LOG(ERROR) << "Out of memory"; + pkgmgrinfo_basic_free_application(application); return false; } app_icon->text = strdup(icon->text); @@ -468,6 +470,7 @@ bool StepParse::FillServiceApplicationInfo(manifest_x* manifest) { icon_x* icon = reinterpret_cast(calloc(1, sizeof(icon_x))); if (!icon) { LOG(ERROR) << "Out of memory"; + pkgmgrinfo_basic_free_application(application); return false; } icon->text = strdup(icon_path.c_str()); @@ -536,6 +539,7 @@ bool StepParse::FillWidgetApplicationInfo(manifest_x* manifest) { icon_x* icon = reinterpret_cast(calloc(1, sizeof(icon_x))); if (!icon) { LOG(ERROR) << "Out of memory"; + pkgmgrinfo_basic_free_application(application); return false; } icon->text = strdup(app_widget.icon_src.c_str());