projects
/
platform
/
core
/
api
/
webapi-plugins.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77f4452
)
[notification] fix prevent CID 24596
author
Hyunjin Park
<hj.na.park@samsung.com>
Wed, 9 Sep 2015 05:09:52 +0000
(14:09 +0900)
committer
Hyunjin Park
<hj.na.park@samsung.com>
Wed, 9 Sep 2015 06:07:04 +0000
(15:07 +0900)
- add SCOPE_EXIT to prevent resource leak
- TCT result : 100% passed
Change-Id: Ibac5e2c719c092d56804921a0876f5597dd8cbb6
src/notification/notification_manager.cc
patch
|
blob
|
history
diff --git
a/src/notification/notification_manager.cc
b/src/notification/notification_manager.cc
index ef17319bfcbdf0116af274a10caf547bf8b0b742..9da44d4e26e8f243701f2b67b7ebe6acc9b8add4 100644
(file)
--- a/
src/notification/notification_manager.cc
+++ b/
src/notification/notification_manager.cc
@@
-168,9
+168,16
@@
PlatformResult NotificationManager::GetAll(picojson::array& out) {
"Cannot get notification id error");
}
- app_control_h app_control;
+ app_control_h app_control
= nullptr
;
PlatformResult status =
StatusNotification::GetAppControl(noti, &app_control);
+
+ SCOPE_EXIT {
+ if (app_control) {
+ app_control_destroy(app_control);
+ }
+ };
+
if (status.IsError())
return status;