Merge branch 'jk/commit-graph-leak-fixes'
Leakfix. * jk/commit-graph-leak-fixes: commit-graph: clear oidset after finishing write commit-graph: free write-context base_graph_name during cleanup commit-graph: free write-context entries before overwriting commit-graph: free graph struct that was not added to chain commit-graph: delay base_graph assignment in add_graph_to_chain() commit-graph: free all elements of graph chain commit-graph: move slab-clearing to close_commit_graph() merge: free result of repo_get_merge_bases() commit-reach: free temporary list in get_octopus_merge_bases() t6700: mark test as leak-free
This commit is contained in:
@ -1632,6 +1632,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
|
||||
|
||||
for (j = remoteheads; j; j = j->next) {
|
||||
struct commit_list *common_one;
|
||||
struct commit *common_item;
|
||||
|
||||
/*
|
||||
* Here we *have* to calculate the individual
|
||||
@ -1641,7 +1642,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
|
||||
common_one = repo_get_merge_bases(the_repository,
|
||||
head_commit,
|
||||
j->item);
|
||||
if (!oideq(&common_one->item->object.oid, &j->item->object.oid)) {
|
||||
common_item = common_one->item;
|
||||
free_commit_list(common_one);
|
||||
if (!oideq(&common_item->object.oid, &j->item->object.oid)) {
|
||||
up_to_date = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user