Fix coverity issue 57/321757/1 accepted/tizen/unified/20250328.082257 accepted/tizen/unified/x/20250330.015843
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 27 Mar 2025 23:50:56 +0000 (08:50 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Thu, 27 Mar 2025 23:50:56 +0000 (08:50 +0900)
Change-Id: Ic973978287b4949525625da3267cc776f0fff9d6
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/server/media-server-socket.c

index 913c14fd5a933cb7f3b779252fef4ebcec88d946..f1e0d42c461af81e920f6f3067408b60e4fbeee9 100644 (file)
@@ -215,7 +215,10 @@ static void __ms_recovery_media_db(uid_t uid)
        ms_reset_ownerlist();
 
        /*write read schema*/
-       ms_connect_db(&handle, uid);
+       if (ms_connect_db(&handle, uid) != MS_MEDIA_ERR_NONE) {
+               MS_DBG_ERR("ms_connect_db fail");
+               return;
+       }
 
        MS_DBG_WARN("START WRITE SCHEMA");
        if (ms_check_db(handle, uid) != MS_MEDIA_ERR_NONE)
@@ -230,7 +233,6 @@ static void __ms_recovery_media_db(uid_t uid)
        ms_check_mounted_storage(uid);
        ms_config_set_int(MS_DB_RESET, 0);
 #endif
-
 }
 
 gboolean ms_read_scanner_dispatcher_socket_func(GIOChannel *src, GIOCondition condition, gpointer user_data)