reset handle after closing db handle
[platform/core/multimedia/media-server.git] / lib / media-util-db.c
index af8728d..a8b4e06 100755 (executable)
@@ -360,8 +360,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)