From: jiyong.min Date: Wed, 11 Mar 2020 04:29:45 +0000 (+0900) Subject: Remove unnecessary allocation X-Git-Tag: accepted/tizen/unified/20200315.214713~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F227263%2F1;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Remove unnecessary allocation - The 'playback' is allocated by _mc_db_get_playback_info() function, so it is redundant allocation before calling the function. Change-Id: I0a6d90db3b85e0b2d841c7cc368bb6cbc74d3b8c --- diff --git a/src/media_controller_client.c b/src/media_controller_client.c index cc6c134..575a79c 100644 --- a/src/media_controller_client.c +++ b/src/media_controller_client.c @@ -103,9 +103,6 @@ static void __client_playback_cb(const char *interface_name, const char *signal_ mc_secure_debug("__client_playback_cb(%s, %s, %s, %s, %p)", interface_name, signal_name, message, request_id, user_data); - playback = (media_controller_playback_s *)calloc(1, sizeof(media_controller_playback_s)); - mc_retm_if(playback == NULL, "Error allocation memory"); - ret = _mc_db_get_playback_info(mc_client->db_handle, message, &playback); if (ret != MEDIA_CONTROLLER_ERROR_NONE) mc_error("Fail to _mc_db_get_playback_info");