summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyeonghun Lee <kh9090.lee@samsung.com>2016-12-30 14:33:26 +0900
committerKyeonghun Lee <kh9090.lee@samsung.com>2017-01-01 17:38:37 -0800
commitd1527190f44c8ca87e1323bedc1d877e4dc3caa0 (patch)
tree30d2b85d6fb441a7b36a831e4d968388f9052b7d
parent3fe911dc989f6709d95a1e469a2b41ec2e1e4266 (diff)
downloadmsg-service-d1527190f44c8ca87e1323bedc1d877e4dc3caa0.tar.gz
msg-service-d1527190f44c8ca87e1323bedc1d877e4dc3caa0.tar.bz2
msg-service-d1527190f44c8ca87e1323bedc1d877e4dc3caa0.zip
fix memory leak
Change-Id: I2c0e33b0b0d693eb19c75c49fbf89ae74f53ac1c Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
-rw-r--r--manager/src/msg-manager.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/manager/src/msg-manager.cpp b/manager/src/msg-manager.cpp
index 4f4ffc3..3f66681 100644
--- a/manager/src/msg-manager.cpp
+++ b/manager/src/msg-manager.cpp
@@ -158,6 +158,8 @@ void _incoming_msg_func(app_control_h app_control)
msg_err = msg_get_message(msg_handle, msg_id, msg, opt);
if (msg_err != MSG_SUCCESS) {
MSG_MGR_ERR("msg_get_message() failed [%d]", msg_err);
+ msg_release_struct(&msg);
+ msg_release_struct(&opt);
return;
}
@@ -219,6 +221,8 @@ void _outgoing_msg_func(app_control_h app_control)
msg_err = msg_get_message(msg_handle, msg_id, msg, opt);
if (msg_err != MSG_SUCCESS) {
MSG_MGR_ERR("msg_get_message() failed [%d]", msg_err);
+ msg_release_struct(&msg);
+ msg_release_struct(&opt);
return;
}
@@ -338,6 +342,8 @@ void _add_noti_func(app_control_h app_control)
msg_err = msg_get_message(msg_handle, msg_id, msg, opt);
if (msg_err != MSG_SUCCESS) {
MSG_MGR_ERR("msg_get_message() failed [%d]", msg_err);
+ msg_release_struct(&msg);
+ msg_release_struct(&opt);
return;
}
@@ -445,6 +451,8 @@ void _add_report_noti_func(app_control_h app_control)
msg_err = msg_get_message(msg_handle, msg_id, msg, opt);
if (msg_err != MSG_SUCCESS) {
MSG_MGR_ERR("msg_get_message() failed [%d]", msg_err);
+ msg_release_struct(&msg);
+ msg_release_struct(&opt);
return;
}
@@ -523,6 +531,8 @@ void _insert_only_active_noti_func(app_control_h app_control)
msg_err = msg_get_message(msg_handle, msg_id, msg, opt);
if (msg_err != MSG_SUCCESS) {
MSG_MGR_ERR("msg_get_message() failed [%d]", msg_err);
+ msg_release_struct(&msg);
+ msg_release_struct(&opt);
return;
}