[UTC][image-util][Non-ACR][mobile/wearable/TV][Fix memory leak problem, remove unnecc...
authorJiyong Min <jiyong.min@samsung.com>
Tue, 7 Jun 2016 10:12:10 +0000 (19:12 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Tue, 7 Jun 2016 10:14:21 +0000 (19:14 +0900)
Change-Id: I38c3f0825fa410f609778abd11303984c9bb7442
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
src/utc/image-util/utc-image-util-jpeg.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index b917734..7236b9a
@@ -64,13 +64,8 @@ static bool __storage_device_supported_cb(int storage_id, storage_type_e type, s
 
 static bool find_first_supported_colorspace_cb( image_util_colorspace_e colorspace, void * user_data)
 {
-       int ret = image_util_decode_jpeg(img_path1, colorspace, &raw_image.buffer,
-                       &raw_image.w, &raw_image.h, &raw_image.size);
-       if(IMAGE_UTIL_ERROR_NONE == ret){
-               *(int*)user_data = colorspace;
-               return false;
-       }
-       return true;
+       SUPPORTED_COLORSPACE = colorspace;
+       return false;
 }
 
 /**
@@ -88,8 +83,7 @@ void utc_image_util_jpeg_startup(void)
                fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
        }
 
-       ret = image_util_foreach_supported_jpeg_colorspace(
-               find_first_supported_colorspace_cb , (void*)(&SUPPORTED_COLORSPACE) );
+       ret = image_util_foreach_supported_jpeg_colorspace(find_first_supported_colorspace_cb , NULL);
        if (IMAGE_UTIL_ERROR_NONE != ret) {
                _is_broken = true;
                return;