summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-02-08 11:14:48 +0000
committerPatrick Steinhardt <ps@pks.im>2018-06-10 19:34:37 +0200
commitecf4f33a4e327a91496f72816f9f02d923e5af05 (patch)
treebb8eccc9ab0dc8f36a702c8a15ad5ae92429ee07 /src/odb.c
parent56ffdfc61e37b9e7634c7c73b05d84355bea61cd (diff)
downloadlibgit2-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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/odb.c b/src/odb.c
index ef9c87555..919a9510a 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -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;
}