From 919a2fb6c1ba2cbc0e73b993e46bb9b939fe9d94 Mon Sep 17 00:00:00 2001 From: "minje.ahn" Date: Thu, 13 Oct 2022 14:34:36 +0900 Subject: [PATCH] Fix crash issue Set to null to prevent malfunction. Change-Id: Ia2bd9ab7089223916e62db2cd4cd31d509c7adfd Signed-off-by: minje.ahn --- src/common/media-svc-db-utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/media-svc-db-utils.c b/src/common/media-svc-db-utils.c index 1eb3d06..500e5e6 100755 --- a/src/common/media-svc-db-utils.c +++ b/src/common/media-svc-db-utils.c @@ -487,10 +487,13 @@ void _media_svc_destroy_table_query(void) /* Table Free */ g_hash_table_destroy(table); + table = NULL; /* Column Free */ - for (i = 0; i < DB_LIST_MAX; i++) + for (i = 0; i < DB_LIST_MAX; i++) { g_slist_free_full(column_list[i], __media_svc_column_free); + column_list[i] = NULL; + } } int _media_svc_sql_query(const char *sql_str, uid_t uid) -- 2.7.4