Fix svace issue (UNREACHABLE_CODE) 58/100658/2 accepted/tizen/3.0/common/20161207.194436 accepted/tizen/3.0/ivi/20161207.011855 accepted/tizen/3.0/mobile/20161207.011432 accepted/tizen/3.0/tv/20161207.011647 submit/tizen_3.0/20161206.052949
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 29 Nov 2016 02:07:21 +0000 (11:07 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 29 Nov 2016 02:21:25 +0000 (11:21 +0900)
[Version] 0.10.1
[Profile] Mobile, TV
[Issue Type] Fix Svace issue

Change-Id: Iccfc8525ec547edd09c53b659f6ea637804a7fef

transcode/mm_transcode.c

index b979171..8070a89 100755 (executable)
@@ -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;
 }