summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-07-07 04:42:53 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2017-07-07 04:42:53 (GMT)
commitc5ad1ae3877f3578a820bedbf253c7dd72e8e382 (patch)
tree05879a283577c7a0fdf66d2636bda58b3fc2439e /src/util
parent8003d8e5e3090490a38eef1387ab6c2587dd5b97 (diff)
downloadlibmedia-thumbnail-c5ad1ae3877f3578a820bedbf253c7dd72e8e382.zip
libmedia-thumbnail-c5ad1ae3877f3578a820bedbf253c7dd72e8e382.tar.gz
libmedia-thumbnail-c5ad1ae3877f3578a820bedbf253c7dd72e8e382.tar.bz2
Modified to check if parameter is null when use sqlite3 apirefs/changes/73/137673/1
Change-Id: I452715dee6760ade0203cd21bb12997b93ea3c9e Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/util')
-rwxr-xr-xsrc/util/media-thumb-db.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/media-thumb-db.c b/src/util/media-thumb-db.c
index e8a999d..a572734 100755
--- a/src/util/media-thumb-db.c
+++ b/src/util/media-thumb-db.c
@@ -64,7 +64,7 @@ int _media_thumb_get_thumb_path_wh_from_db(sqlite3 *handle,
thumb_dbg_slog("Query: %s", query_string);
err = sqlite3_prepare_v2(handle, query_string, strlen(query_string), &stmt, NULL);
- sqlite3_free(query_string);
+ SQLITE3_SAFE_FREE(query_string);
if (SQLITE_OK != err) {
thumb_err("prepare error [%s]", sqlite3_errmsg(handle));
return MS_MEDIA_ERR_DB_INTERNAL;
@@ -73,7 +73,7 @@ int _media_thumb_get_thumb_path_wh_from_db(sqlite3 *handle,
err = sqlite3_step(stmt);
if (err != SQLITE_ROW) {
thumb_err("end of row [%s]", sqlite3_errmsg(handle));
- sqlite3_finalize(stmt);
+ SQLITE3_FINALIZE(stmt);
return MS_MEDIA_ERR_DB_INTERNAL;
}
@@ -87,7 +87,7 @@ int _media_thumb_get_thumb_path_wh_from_db(sqlite3 *handle,
*height = 0;
}
- sqlite3_finalize(stmt);
+ SQLITE3_FINALIZE(stmt);
return MS_MEDIA_ERR_NONE;
}
@@ -123,7 +123,7 @@ int _media_thumb_update_thumb_path_wh_to_db(const char *origin_path,
thumb_dbg("Query success");
}
- sqlite3_free(query_string);
+ SQLITE3_SAFE_FREE(query_string);
return err;
}