mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Merge pull request #7232 from kcsaul/fix/config-memory-backend
Config Memory Backend Corruption Fix
This commit is contained in:
@@ -199,6 +199,7 @@ static int config_memory_get(git_config_backend *backend, const char *key, git_c
|
||||
if ((error = git_config_list_get(&entry, memory_backend->config_list, key)) != 0)
|
||||
return error;
|
||||
|
||||
git_config_list_incref(memory_backend->config_list);
|
||||
*out = &entry->base;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ static void assert_config_contains(git_config_backend *backend,
|
||||
git_config_entry *entry = NULL;
|
||||
cl_git_pass(git_config_backend_get_string(&entry, backend, name));
|
||||
cl_assert_equal_s(entry->value, value);
|
||||
git_config_entry_free(entry);
|
||||
}
|
||||
|
||||
struct expected_entry {
|
||||
|
||||
Reference in New Issue
Block a user