Release version 0.7.18
[platform/core/api/notification.git] / notification-ex / group_item.cc
index 3407938..75a55c7 100644 (file)
@@ -56,10 +56,12 @@ GroupItem::Impl::Impl(GroupItem* parent)
   LOGI("GroupItem created");
   char* name;
   int ret = app_get_name(&name);
-  if (ret != APP_ERROR_NONE)
+  if (ret != APP_ERROR_NONE) {
     app_label_ = util::GetAppId();
-  else
+  } else {
     app_label_ = string(name);
+    free(name);
+  }
 }
 
 GroupItem::~GroupItem() {
@@ -199,9 +201,7 @@ void GroupItem::RemoveChild(string itemId) {
 }
 
 void GroupItem::RemoveChildren() {
-  for (auto& i : impl_->children_list_) {
-    impl_->children_list_.remove(i);
-  }
+  impl_->children_list_.clear();
 }
 
 list<shared_ptr<AbstractItem>> GroupItem::GetChildren() {