+static void __callback_info_free(message_port_callback_info_s *callback_info)
+{
+ GError *error = NULL;
+ if (callback_info == NULL)
+ return;
+
+ if (callback_info->remote_app_id)
+ free(callback_info->remote_app_id);
+
+ if (callback_info->remote_port)
+ free(callback_info->remote_port);
+
+ if (callback_info->gio_read != NULL) {
+ g_io_channel_shutdown(callback_info->gio_read, FALSE, &error);
+ if (error) {
+ _LOGE("g_io_channel_shutdown error : %s", error->message);
+ g_error_free(error);
+ }
+ g_io_channel_unref(callback_info->gio_read);
+ callback_info->gio_read = NULL;
+ }
+
+ if (callback_info->g_src_id != 0) {
+ g_source_remove(callback_info->g_src_id);
+ callback_info->g_src_id = 0;
+ }
+
+ free(callback_info);
+}
+