Skip to content

Commit 9faf36a

Browse files
committed
mailmap: git_buf_free => git_buf_dispose
1 parent d91d296 commit 9faf36a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/mailmap.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,10 @@ int git_mailmap_add_buffer(git_mailmap *mm, const char *buf, size_t len)
265265
}
266266

267267
cleanup:
268-
git_buf_free(&real_name);
269-
git_buf_free(&real_email);
270-
git_buf_free(&replace_name);
271-
git_buf_free(&replace_email);
268+
git_buf_dispose(&real_name);
269+
git_buf_dispose(&real_email);
270+
git_buf_dispose(&replace_name);
271+
git_buf_dispose(&replace_email);
272272
return error;
273273
}
274274

@@ -313,7 +313,7 @@ static int mailmap_add_blob(
313313
goto cleanup;
314314

315315
cleanup:
316-
git_buf_free(&content);
316+
git_buf_dispose(&content);
317317
git_blob_free(blob);
318318
git_object_free(object);
319319
return error;
@@ -340,8 +340,8 @@ static int mailmap_add_file_ondisk(
340340
goto cleanup;
341341

342342
cleanup:
343-
git_buf_free(&fullpath);
344-
git_buf_free(&content);
343+
git_buf_dispose(&fullpath);
344+
git_buf_dispose(&content);
345345
return error;
346346
}
347347

@@ -386,8 +386,8 @@ static void mailmap_add_from_repository(git_mailmap *mm, git_repository *repo)
386386
if (path != NULL)
387387
mailmap_add_file_ondisk(mm, path, repo);
388388

389-
git_buf_free(&rev_buf);
390-
git_buf_free(&path_buf);
389+
git_buf_dispose(&rev_buf);
390+
git_buf_dispose(&path_buf);
391391
git_config_free(config);
392392
}
393393

tests/mailmap/parsing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void test_mailmap_parsing__windows_string(void)
8888
git_buf_text_lf_to_crlf(&winbuf, &unixbuf);
8989

9090
cl_git_pass(git_mailmap_from_buffer(&g_mailmap, winbuf.ptr, winbuf.size));
91-
git_buf_free(&winbuf);
91+
git_buf_dispose(&winbuf);
9292

9393
/* We should have parsed all of the entries */
9494
check_mailmap_entries(g_mailmap, entries, ARRAY_SIZE(entries));

0 commit comments

Comments
 (0)