}
ret = mc_db_update_playlist(mc_server->db_handle, mc_server->server_name, _playlist->playlist_name, query_list);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to mc_db_update_playlist");
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ mc_error("fail to mc_db_update_playlist");
+ goto RELEASE;
+ }
ret = __mc_server_send_message(mc_server, MC_DBUS_UPDATE_INTERFACE, MC_DBUS_SIGNAL_NAME_PLAYLIST, MC_PLAYLIST_UPDATED, 0, _playlist->playlist_name);
- mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "fail to __mc_server_send_message");
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ mc_error("fail to __mc_server_send_message");
+ goto RELEASE;
+ }
+RELEASE:
for (idx = 0; idx < length; idx++) {
__mc_server_playlist_item_release((mc_playlist_item_s*)g_list_nth_data(_playlist->item_list, idx));
}