From: hyunho Date: Thu, 29 Oct 2020 10:42:21 +0000 (+0900) Subject: Fix memory leak X-Git-Tag: accepted/tizen/6.0/unified/20201110.010746~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F246444%2F2;p=platform%2Fcore%2Fapi%2Fnotification.git Fix memory leak Change-Id: I91519afe7a367266bbaf5bf160c4965c4ce54225 Signed-off-by: hyunho --- diff --git a/notification-ex/stub.cc b/notification-ex/stub.cc index 2f3300c..7d523e6 100644 --- a/notification-ex/stub.cc +++ b/notification-ex/stub.cc @@ -1072,8 +1072,9 @@ extern "C" EXPORT_API int noti_ex_item_group_foreach_child(noti_ex_item_h handle list> children = p->GetChildren(); LOGI("Retrive (%zd)", children.size()); for (auto i : children) { + Handle handle(i); int ret = callback( - static_cast(new Handle(i)), data); + static_cast(&handle), data); if (ret != NOTI_EX_ERROR_NONE) { LOGW("callback return (%d) stop foreach", ret); break;