Fix issue detected by static analysis tool
[platform/core/uifw/capi-ui-sticker.git] / server / stickerd_db_manager.c
index f3acdbd..ad78560 100644 (file)
@@ -211,12 +211,14 @@ static int _recover_db(void)
     if (ret != SQLITE_OK) {
         LOGE("Failed to create sticker_whitelist_info table : %s", err);
         ret = STICKERD_SERVER_ERROR_DB_FAILED;
+        goto cleanup;
     }
 
     ret = sqlite3_exec(db, STICKER_RECENT_HISTORY_INFO_CREATE_TABLE, NULL, NULL, &err);
     if (ret != SQLITE_OK) {
         LOGE("Failed to create sticker_recent_history_info table : %s", err);
         ret = STICKERD_SERVER_ERROR_DB_FAILED;
+        goto cleanup;
     }
 
     is_corrupted = FALSE;