diff options
author | Patrick Steinhardt <ps@pks.im> | 2019-02-21 14:10:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-21 14:10:43 +0100 |
commit | 3aa8401a8fd8dc919867a33a36c11db7d63cf223 (patch) | |
tree | 026b53d285a2bbc134ee959988ecd03e22b5acd8 | |
parent | 68ba2e8d16fb288d3631bf5a1adf41858837ecd1 (diff) | |
parent | bbdcd45055ca702eb5083ebf0c70f04c15642f78 (diff) | |
download | libgit2-3aa8401a8fd8dc919867a33a36c11db7d63cf223.tar.gz |
Merge pull request #4992 from pks-t/pks/cache-dispose
cache: fix misnaming of `git_cache_free`
-rw-r--r-- | src/cache.c | 2 | ||||
-rw-r--r-- | src/cache.h | 2 | ||||
-rw-r--r-- | src/odb.c | 4 | ||||
-rw-r--r-- | src/repository.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/cache.c b/src/cache.c index 66107eaa9..4af2321b9 100644 --- a/src/cache.c +++ b/src/cache.c @@ -101,7 +101,7 @@ void git_cache_clear(git_cache *cache) git_rwlock_wrunlock(&cache->lock); } -void git_cache_free(git_cache *cache) +void git_cache_dispose(git_cache *cache) { git_cache_clear(cache); git_oidmap_free(cache->map); diff --git a/src/cache.h b/src/cache.h index d2386eea6..1e6179236 100644 --- a/src/cache.h +++ b/src/cache.h @@ -43,7 +43,7 @@ extern git_atomic_ssize git_cache__current_storage; int git_cache_set_max_object_size(git_object_t type, size_t size); int git_cache_init(git_cache *cache); -void git_cache_free(git_cache *cache); +void git_cache_dispose(git_cache *cache); void git_cache_clear(git_cache *cache); void *git_cache_store_raw(git_cache *cache, git_odb_object *entry); @@ -448,7 +448,7 @@ int git_odb_new(git_odb **out) return -1; } if (git_vector_init(&db->backends, 4, backend_sort_cmp) < 0) { - git_cache_free(&db->own_cache); + git_cache_dispose(&db->own_cache); git__free(db); return -1; } @@ -686,7 +686,7 @@ static void odb_free(git_odb *db) } git_vector_free(&db->backends); - git_cache_free(&db->own_cache); + git_cache_dispose(&db->own_cache); git__memzero(db, sizeof(*db)); git__free(db); diff --git a/src/repository.c b/src/repository.c index 2bfa57736..203a6e864 100644 --- a/src/repository.c +++ b/src/repository.c @@ -160,7 +160,7 @@ void git_repository_free(git_repository *repo) git_repository__cleanup(repo); - git_cache_free(&repo->objects); + git_cache_dispose(&repo->objects); git_diff_driver_registry_free(repo->diff_drivers); repo->diff_drivers = NULL; @@ -245,7 +245,7 @@ static git_repository *repository_alloc(void) on_error: if (repo) - git_cache_free(&repo->objects); + git_cache_dispose(&repo->objects); git__free(repo); return NULL; |