change strdup to g_strdup 76/144576/1
authorHaejeong Kim <backto.kim@samsung.com>
Thu, 17 Aug 2017 07:26:31 +0000 (16:26 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Thu, 17 Aug 2017 07:26:31 +0000 (16:26 +0900)
Change-Id: I71422248f0d6e67f24d06861ee4307122231e8b4

src/dcm_svc_detect_face.c
src/dcm_svc_extract_color.c

index 0e6986c12a9f6b84c7a3224511b568f0a86ebc4d..412b7c0d767dff85f6b998daeaa57082a1b6ca1c 100755 (executable)
@@ -180,7 +180,7 @@ int dcm_face_detect_process(dcm_svc_item_s *scan_item, dcm_face_scan_status_e sc
                dcm_debug("[#%d] face rect: XYWH (%d, %d, %d, %d)", i, face->face_rect_x, face->face_rect_y, face->face_rect_w,
                face->face_rect_h);
 
-               face->media_uuid = strdup(scan_item->media_uuid);
+               face->media_uuid = g_strdup(scan_item->media_uuid);
 
                /* Insert face rectangle into database */
                ret = dcm_svc_db_generate_uuid(&face);
index eab32c796a9869ecdf23da89e53d88f3a454a260..aea1d1340cfe98fdb1dd87c103f905f4556c37e7 100755 (executable)
@@ -43,8 +43,8 @@ int dcm_color_extract_process(dcm_svc_item_s *scan_item, dcm_image_info_s *image
 
        dcm_debug("image_util_extract_color_from_memory result r:%02x, g:%02x, b:%02x", colorItem.rgb_r, colorItem.rgb_g, colorItem.rgb_b);
 
-       colorItem.media_uuid = strdup(scan_item->media_uuid);
-       colorItem.storage_uuid = strdup(scan_item->storage_uuid);
+       colorItem.media_uuid = g_strdup(scan_item->media_uuid);
+       colorItem.storage_uuid = g_strdup(scan_item->storage_uuid);
        ret = dcm_svc_db_update_color_to_db(colorItem);
        if (ret != MS_MEDIA_ERR_NONE) {
                dcm_error("Failed to update color item into db! err: %d", ret);