diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-02-08 11:14:48 +0000 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-06-10 19:34:37 +0200 |
| commit | ecf4f33a4e327a91496f72816f9f02d923e5af05 (patch) | |
| tree | bb8eccc9ab0dc8f36a702c8a15ad5ae92429ee07 /src/odb.c | |
| parent | 56ffdfc61e37b9e7634c7c73b05d84355bea61cd (diff) | |
| download | libgit2-ecf4f33a4e327a91496f72816f9f02d923e5af05.tar.gz | |
Convert usage of `git_buf_free` to new `git_buf_dispose`
Diffstat (limited to 'src/odb.c')
| -rw-r--r-- | src/odb.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -260,12 +260,12 @@ int git_odb__hashfd_filtered( error = git_filter_list_apply_to_data(&post, fl, &raw); - git_buf_free(&raw); + git_buf_dispose(&raw); if (!error) error = git_odb_hash(out, post.ptr, post.size, type); - git_buf_free(&post); + git_buf_dispose(&post); } return error; @@ -588,12 +588,12 @@ static int load_alternates(git_odb *odb, const char *objects_dir, int alternate_ return -1; if (git_path_exists(alternates_path.ptr) == false) { - git_buf_free(&alternates_path); + git_buf_dispose(&alternates_path); return 0; } if (git_futils_readbuffer(&alternates_buf, alternates_path.ptr) < 0) { - git_buf_free(&alternates_path); + git_buf_dispose(&alternates_path); return -1; } @@ -619,8 +619,8 @@ static int load_alternates(git_odb *odb, const char *objects_dir, int alternate_ break; } - git_buf_free(&alternates_path); - git_buf_free(&alternates_buf); + git_buf_dispose(&alternates_path); + git_buf_dispose(&alternates_buf); return result; } @@ -1181,7 +1181,7 @@ static int read_prefix_1(git_odb_object **out, git_odb *db, git_oid_tostr_s(&found_full_oid)); error = git_odb__error_ambiguous(buf.ptr); - git_buf_free(&buf); + git_buf_dispose(&buf); goto out; } |
