Resolved crash in detail view 95/71795/1 accepted/tizen/mobile/20160608.000129 submit/tizen_mobile/20160527.090015 submit/tizen_mobile/20160607.081129 submit/tizen_mobile/20160607.090424 submit/tizen_mobile/20160607.095126
authorShubham Kumar <shubham.srib@samsung.com>
Fri, 27 May 2016 06:50:25 +0000 (12:20 +0530)
committerShubham Kumar <shubham.srib@samsung.com>
Fri, 27 May 2016 06:50:25 +0000 (12:20 +0530)
Change-Id: Iec1729818cdd0142c72d10d78e707d2263436584
Signed-off-by: Shubham Kumar <shubham.srib@samsung.com>
src/common/mp-util.c

index 12f30eb..cd5088d 100755 (executable)
@@ -738,13 +738,13 @@ char * mp_util_file_mime_type_get(const char *uri)
        char *file_ext = g_strdup(extension + 1);
        retcode = mime_type_get_mime_type(file_ext, &mime);
        if ((mime == NULL) || (retcode != MIME_TYPE_ERROR_NONE)) {
-               free(extension);
                free(file_ext);
                WARN_TRACE("Fail to get mime type with return value [%d]", retcode);
                return NULL;
        }
-       free(extension);
-       free(file_ext);
+       if (file_ext) {
+               free(file_ext);
+       }
        return mime;
 }