fully featured json file database
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 12s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Successful in 12s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 11s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make-Without-sqlite3 (push) Successful in 8s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake-Without-sqlite3 (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson-Without-sqlite3 (push) Successful in 12s

This commit is contained in:
wt committed 2025-10-23 14:16:03 +07:00
1 parent 5fda74ab1d
commit bed968b4e4
11 files changed
+107 -76

No files matched your search

+8 -14
View File
@@ -1,16 +1,10 @@
#ifndef USE_SQLITE3
#include "cJSON.h"
#endif
#include "database.h"
#include "user.h"
#ifdef USE_SQLITE3
#include "sql.h"
#endif
#include "user.h"
#ifndef USE_SQLITE3
#else
#include "cJSON.h"
#include "file.h"
#endif
@@ -75,11 +69,11 @@ User *db_get_user_by_username(const char *username) {
}
}
if (found == nullptr) {
pthread_mutex_unlock(&users_file_mutex);
// if (user != nullptr) cJSON_Delete(user);
cJSON_Delete(users);
free(data);
return nullptr;
pthread_mutex_unlock(&users_file_mutex);
// if (user != nullptr) cJSON_Delete(user);
cJSON_Delete(users);
free(data);
return nullptr;
}
pthread_mutex_unlock(&users_file_mutex);
// if (user != nullptr) cJSON_Delete(user);