Fix bug 60/206660/3 accepted/tizen/unified/20190530.043044 submit/tizen/20190524.060410
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 23 May 2019 02:16:12 +0000 (11:16 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Thu, 23 May 2019 04:37:17 +0000 (13:37 +0900)
Change-Id: I98364a89f4f2adf5944fb51d71bf81d2949d65cf
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/media-svc-media.c
src/common/media-svc-storage.c

index abd27e0..1a38e37 100755 (executable)
@@ -365,8 +365,8 @@ int _media_svc_update_item_with_data(bool is_direct, const char *storage_id, med
                _media_svc_sql_query_add(&g_media_svc_insert_item_query_list, &sql);
        } else {
                ret = _media_svc_sql_query(sql, uid);
+               SQLITE3_SAFE_FREE(sql);
        }
-       SQLITE3_SAFE_FREE(sql);
 
        return ret;
 }
index 858b4fa..062c56b 100755 (executable)
@@ -133,7 +133,7 @@ int __media_svc_delete_thumbnail(sqlite3 *handle, const char *storage_id)
        char *sql = NULL;
        sqlite3_stmt *sql_stmt = NULL;
 
-       sql = sqlite3_mprintf("SELECT thumbnail_path FROM '%q' WHERE thumbnail_path is not null;", storage_id);
+       sql = sqlite3_mprintf("SELECT media_thumbnail_path FROM '%q' WHERE media_thumbnail_path is not null;", storage_id);
        ret = _media_svc_sql_prepare_to_step_simple(handle, sql, &sql_stmt);
        media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);