mailmap: git_buf_free => git_buf_dispose
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/src/mailmap.c b/src/mailmap.c
index f249c52..b5fb7f6 100644
--- a/src/mailmap.c
+++ b/src/mailmap.c
@@ -265,10 +265,10 @@ int git_mailmap_add_buffer(git_mailmap *mm, const char *buf, size_t len)
}
cleanup:
- git_buf_free(&real_name);
- git_buf_free(&real_email);
- git_buf_free(&replace_name);
- git_buf_free(&replace_email);
+ git_buf_dispose(&real_name);
+ git_buf_dispose(&real_email);
+ git_buf_dispose(&replace_name);
+ git_buf_dispose(&replace_email);
return error;
}
@@ -313,7 +313,7 @@ static int mailmap_add_blob(
goto cleanup;
cleanup:
- git_buf_free(&content);
+ git_buf_dispose(&content);
git_blob_free(blob);
git_object_free(object);
return error;
@@ -340,8 +340,8 @@ static int mailmap_add_file_ondisk(
goto cleanup;
cleanup:
- git_buf_free(&fullpath);
- git_buf_free(&content);
+ git_buf_dispose(&fullpath);
+ git_buf_dispose(&content);
return error;
}
@@ -386,8 +386,8 @@ static void mailmap_add_from_repository(git_mailmap *mm, git_repository *repo)
if (path != NULL)
mailmap_add_file_ondisk(mm, path, repo);
- git_buf_free(&rev_buf);
- git_buf_free(&path_buf);
+ git_buf_dispose(&rev_buf);
+ git_buf_dispose(&path_buf);
git_config_free(config);
}
diff --git a/tests/mailmap/parsing.c b/tests/mailmap/parsing.c
index 2cb8304..d3efe40 100644
--- a/tests/mailmap/parsing.c
+++ b/tests/mailmap/parsing.c
@@ -88,7 +88,7 @@ void test_mailmap_parsing__windows_string(void)
git_buf_text_lf_to_crlf(&winbuf, &unixbuf);
cl_git_pass(git_mailmap_from_buffer(&g_mailmap, winbuf.ptr, winbuf.size));
- git_buf_free(&winbuf);
+ git_buf_dispose(&winbuf);
/* We should have parsed all of the entries */
check_mailmap_entries(g_mailmap, entries, ARRAY_SIZE(entries));