summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhyunho <hhstark.kang@samsung.com>2020-10-29 19:42:21 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2020-10-30 14:30:35 +0900
commite8e7576bb0fc12e08a17689b104b7aed1f96c96d (patch)
tree5fc7d15fb4e6ebbdcd38a923a90a87bd373dd2ec
parent26558c8865f60fbd3eef87ce8816d0b86c7952fa (diff)
downloadnotification-e8e7576bb0fc12e08a17689b104b7aed1f96c96d.tar.gz
notification-e8e7576bb0fc12e08a17689b104b7aed1f96c96d.tar.bz2
notification-e8e7576bb0fc12e08a17689b104b7aed1f96c96d.zip
Fix memory leak
Change-Id: I91519afe7a367266bbaf5bf160c4965c4ce54225 Signed-off-by: hyunho <hhstark.kang@samsung.com>
-rw-r--r--notification-ex/stub.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/notification-ex/stub.cc b/notification-ex/stub.cc
index ee96857..e563d15 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<shared_ptr<AbstractItem>> children = p->GetChildren();
LOGI("Retrive (%zd)", children.size());
for (auto i : children) {
+ Handle handle(i);
int ret = callback(
- static_cast<noti_ex_item_h>(new Handle(i)), data);
+ static_cast<noti_ex_item_h>(&handle), data);
if (ret != NOTI_EX_ERROR_NONE) {
LOGW("callback return (%d) stop foreach", ret);
break;