if (ret != MEDIA_CONTROLLER_ERROR_NONE)
mc_error("Error mc_ipc_send_message [%d]", ret);
- MC_SAFE_FREE(message);
- MC_SAFE_FREE(interface_name);
+ MC_SAFE_G_FREE(message);
+ MC_SAFE_G_FREE(interface_name);
return ret;
}
if (ret != MEDIA_CONTROLLER_ERROR_NONE)
mc_error("Error mc_ipc_send_message [%d]", ret);
- MC_SAFE_FREE(message);
- MC_SAFE_FREE(interface_name);
+ MC_SAFE_G_FREE(message);
+ MC_SAFE_G_FREE(interface_name);
return ret;
}
if (_mc_ipc_is_listener_duplicated(listener_list, key)) {
mc_error("listener is duplicated");
- MC_SAFE_FREE(key);
+ MC_SAFE_G_FREE(key);
return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER;
}
mc_ipc_listener_s *listener = (mc_ipc_listener_s *)g_malloc(sizeof(mc_ipc_listener_s));
if (listener == NULL) {
mc_error("Error memroy allocation");
- MC_SAFE_FREE(key);
+ MC_SAFE_G_FREE(key);
return MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY;
}
handler = _mc_ipc_signal_subscribe(connection, interface_name, signal_name, listener_list);
listener->dbus_conn = connection;
- listener->interface_name = g_strdup(interface_name);
- listener->signal_name = g_strdup(signal_name);
+ listener->interface_name = strdup(interface_name);
+ listener->signal_name = strdup(signal_name);
listener->callback = callback;
listener->user_data = user_data;
listener->handler = handler;
_mc_ipc_signal_unsubscribe(connection, listener->handler);
MC_SAFE_FREE(listener->interface_name);
MC_SAFE_FREE(listener->signal_name);
- MC_SAFE_FREE(listener->key);
+ MC_SAFE_G_FREE(listener->key);
(listener_list) = g_list_remove(listener_list, listener);
MC_SAFE_FREE(listener);
mc_debug("listener[%s.%s] is unregistered", interface_name, signal_name);
}
}
- MC_SAFE_FREE(key);
+ MC_SAFE_G_FREE(key);
return MEDIA_CONTROLLER_ERROR_NONE;
}
_mc_ipc_signal_unsubscribe(connection, listener->handler);
MC_SAFE_FREE(listener->interface_name);
MC_SAFE_FREE(listener->signal_name);
- MC_SAFE_FREE(listener->key);
+ MC_SAFE_G_FREE(listener->key);
(listener_list) = g_list_remove(listener_list, listener);
MC_SAFE_FREE(listener);
}
mc_error("Error mc_ipc_send_message [%d]", ret);
}
- MC_SAFE_FREE(filter_interface_name);
- MC_SAFE_FREE(message);
+ MC_SAFE_G_FREE(filter_interface_name);
+ MC_SAFE_G_FREE(message);
return ret;
}
if (ret != MEDIA_CONTROLLER_ERROR_NONE)
mc_error("fail mc_ipc_send_message [%d]", ret);
- MC_SAFE_FREE(message);
- MC_SAFE_FREE(interface_name);
+ MC_SAFE_G_FREE(message);
+ MC_SAFE_G_FREE(interface_name);
return ret;
}
temp = g_strdup_printf("%s.%s.%s", MC_DBUS_INTERFACE_PREFIX, type, name);
_mc_util_check_valid_name(temp, &interface_name);
- MC_SAFE_FREE(temp);
+ MC_SAFE_G_FREE(temp);
return interface_name;
}
_mc_util_check_valid_name(temp, interface_name);
- MC_SAFE_FREE(temp);
+ MC_SAFE_G_FREE(temp);
return MEDIA_CONTROLLER_ERROR_NONE;
}
ret = mc_ipc_send_message_to_server(MC_MSG_CLIENT_SET, message);
- MC_SAFE_FREE(message);
+ MC_SAFE_G_FREE(message);
return ret;
}
ret = mc_ipc_send_message_to_server(MC_MSG_CLIENT_GET, message);
- MC_SAFE_FREE(message);
+ MC_SAFE_G_FREE(message);
return ret;
}