reset handle after closing db handle 29/305529/1
authorsamsung2013 <yuzhi.he@samsung.com>
Sun, 4 Feb 2024 06:19:55 +0000 (14:19 +0800)
committersamsung2013 <yuzhi.he@samsung.com>
Sun, 4 Feb 2024 06:19:55 +0000 (14:19 +0800)
Change-Id: I356674e83dfc3abf3d2e976f9a944ba29e315044

lib/media-util-db.c

index 6c2cf6c..2ca52dc 100644 (file)
@@ -352,8 +352,10 @@ void media_db_disconnect(sqlite3 *handle)
 {
        MSAPI_DBG_FUNC();
 
-       if (handle)
+       if (handle) {
                sqlite3_close_v2(handle);
+               handle = NULL;
+       }
 }
 
 int media_db_request_update_db(const char *query_str, uid_t uid)