diff --git a/core_info.c b/core_info.c index d96d393654..20fa4c2884 100644 --- a/core_info.c +++ b/core_info.c @@ -1520,9 +1520,10 @@ bool core_info_set_core_lock(const char *core_path, bool lock) { core_info_ctx_find_t core_info; char lock_file_path[PATH_MAX_LENGTH]; - RFILE *lock_file = NULL; bool lock_file_exists = false; + lock_file_path[0] = '\0'; + if (string_is_empty(core_path)) return false; @@ -1596,6 +1597,8 @@ bool core_info_get_core_lock(const char *core_path, bool validate_path) bool is_locked = false; core_info_ctx_find_t core_info; + lock_file_path[0] = '\0'; + if (string_is_empty(core_path)) return false;