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:
d69e0aa
)
[Notification] Fix memory leak.
58/271858/3
author
Marcin Bialek
<m.bialek@samsung.com>
Wed, 2 Mar 2022 11:58:36 +0000
(12:58 +0100)
committer
Marcin Bialek
<m.bialek@samsung.com>
Wed, 2 Mar 2022 12:10:39 +0000
(13:10 +0100)
[Verification] Code compiles.
Change-Id: I9e75cfd1d91021eb7a8bb074bcd0505c8002997b
src/notification/common_notification.cc
patch
|
blob
|
history
diff --git
a/src/notification/common_notification.cc
b/src/notification/common_notification.cc
index
cee4084
..
cd03304
100644
(file)
--- a/
src/notification/common_notification.cc
+++ b/
src/notification/common_notification.cc
@@
-745,7
+745,7
@@
PlatformResult CommonNotification::GetEventHandler(notification_h noti_handle,
notification_event_type_e event_type,
app_control_h* event_handler) {
ScopeLogger();
- app_control_h handler;
+ app_control_h handler
= nullptr
;
int ret = notification_get_event_handler(noti_handle, event_type, &handler);
if (NOTIFICATION_ERROR_NONE != ret) {
@@
-755,6
+755,8
@@
PlatformResult CommonNotification::GetEventHandler(notification_h noti_handle,
if (event_handler) {
*event_handler = handler;
+ } else {
+ app_control_destroy(handler);
}
return PlatformResult(ErrorCode::NO_ERROR);