From: Gilbok Lee Date: Tue, 29 Nov 2016 02:07:21 +0000 (+0900) Subject: Fix svace issue (UNREACHABLE_CODE) X-Git-Tag: submit/tizen_3.0/20161206.052949^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91924a6d49111b94e9d1939d541bbd903a642d3c;p=platform%2Fcore%2Fmultimedia%2Flibmm-transcode.git Fix svace issue (UNREACHABLE_CODE) [Version] 0.10.1 [Profile] Mobile, TV [Issue Type] Fix Svace issue Change-Id: Iccfc8525ec547edd09c53b659f6ea637804a7fef --- diff --git a/transcode/mm_transcode.c b/transcode/mm_transcode.c index b979171..8070a89 100755 --- a/transcode/mm_transcode.c +++ b/transcode/mm_transcode.c @@ -44,48 +44,41 @@ int mm_transcode_create(MMHandleType *MMHandle) handle->decoder_vidp = g_new0(handle_vidp_plugin_s, 1); if (!handle->decoder_vidp) { debug_error("[ERROR] - handle decoder video process bin"); - goto ERROR5; + goto ERROR4; } handle->decoder_audp = g_new0(handle_audp_plugin_s, 1); if (!handle->decoder_audp) { debug_error("[ERROR] - handle decoder audio process bin"); - goto ERROR4; + goto ERROR3; } handle->encodebin = g_new0(handle_encode_s, 1); if (!handle->encodebin) { debug_error("[ERROR] - handle encodebin"); - goto ERROR3; + goto ERROR2; } handle->property = g_new0(handle_property_s, 1); if (!handle->property) { debug_error("[ERROR] - handle property"); - goto ERROR2; + goto ERROR1; } - *MMHandle = (MMHandleType) handle; + *MMHandle = (MMHandleType)handle; - if (MMHandle) { - debug_log("MMHandle: 0x%2x", handle); - handle->property->_MMHandle = 0; - } else { - debug_error("handle create Fail"); - goto ERROR1; - } + debug_log("MMHandle: 0x%2x", handle); + handle->property->_MMHandle = 0; return ret; ERROR1: - TRANSCODE_FREE(handle->property); -ERROR2: TRANSCODE_FREE(handle->encodebin); -ERROR3: +ERROR2: TRANSCODE_FREE(handle->decoder_audp); -ERROR4: +ERROR3: TRANSCODE_FREE(handle->decoder_vidp); -ERROR5: +ERROR4: TRANSCODE_FREE(handle); return MM_ERROR_TRANSCODE_INTERNAL; }