Change-Id: I4f396cba56dfcf97505180131a7537c16320752b
Signed-off-by: Jiwan Kim <ji-wan.kim@samsung.com>
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ,
&req, sizeof(req),
on_zclglobal_control_write_attributes_req_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ,
&req, sizeof(req),
on_zclglobal_control_write_attributes_req_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.write_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ,
&req, sizeof(req),
on_zclglobal_control_write_attributes_undivided_req_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ,
&req, sizeof(req),
on_zclglobal_control_write_attributes_undivided_req_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.write_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP,
&req, sizeof(req),
on_zclglobal_control_write_attributes_no_resp_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP,
&req, sizeof(req),
on_zclglobal_control_write_attributes_no_resp_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.write_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.write_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED,
&req, sizeof(req),
on_zclglobal_control_write_attributes_structured_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED,
&req, sizeof(req),
on_zclglobal_control_write_attributes_structured_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.write_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.read_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.read_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED,
&req, sizeof(req),
on_zclglobal_control_read_attributes_structured_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED,
&req, sizeof(req),
on_zclglobal_control_read_attributes_structured_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.read_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.read_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.read_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ,
&req, sizeof(req),
on_zclglobal_control_configure_reporting_req_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ,
&req, sizeof(req),
on_zclglobal_control_configure_reporting_req_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.read_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.read_records);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.read_records);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING,
&req, sizeof(req),
on_zclglobal_control_read_configure_reporting_resp, resp_cb_data);
ZBLIB_ZCL_GLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING,
&req, sizeof(req),
on_zclglobal_control_read_configure_reporting_resp, resp_cb_data);
+
+ /* Free resource */
+ g_free(req.read_records);
+
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
if (FALSE == ret) {
Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.ext_field_set);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
/* Send failure response */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
+ g_free(req.in_cl);
+ g_free(req.out_cl);
plugin = info->plugin;
service = zblib_plugin_ref_service(plugin);
plugin = info->plugin;
service = zblib_plugin_ref_service(plugin);
- plugin_name = zblib_plugin_get_plugin_name(plugin);
-
zblib_check_null_ret("service", service);
zblib_check_null_ret("service", service);
+ plugin_name = zblib_plugin_get_plugin_name(plugin);
+
info->is_finished = TRUE;
if (result) {
Z_LOGD("Plugin [%s] succeeded async init", plugin_name);
info->is_finished = TRUE;
if (result) {
Z_LOGD("Plugin [%s] succeeded async init", plugin_name);
zblib_plugin_init_finished_cb callback, void *user_data)
{
const ZblibPluginDescriptor_t *descriptor = zblib_plugin_get_descriptor(plugin);
zblib_plugin_init_finished_cb callback, void *user_data)
{
const ZblibPluginDescriptor_t *descriptor = zblib_plugin_get_descriptor(plugin);
- char *plugin_name = zblib_plugin_get_plugin_name(plugin);
+ char *plugin_name = NULL;
zblib_check_null_ret_error("descriptor", descriptor, FALSE);
zblib_check_null_ret_error("descriptor->init_async", descriptor->init_async, FALSE);
zblib_check_null_ret_error("descriptor", descriptor, FALSE);
zblib_check_null_ret_error("descriptor->init_async", descriptor->init_async, FALSE);
+ plugin_name = zblib_plugin_get_plugin_name(plugin);
if (G_UNLIKELY(NULL != plugin_name))
plugin_name = g_strdup("NONAME");
if (G_UNLIKELY(NULL != plugin_name))
plugin_name = g_strdup("NONAME");