Skip to content

Commit cc84559

Browse files
committed
examples: fix remaining review comments
1 parent 5ce4f19 commit cc84559

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/merge.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ static int create_merge_commit(git_repository *repo, git_index *index, merge_opt
244244
check_lg2(git_repository_head(&head_ref, repo), "failed to get repo HEAD", NULL);
245245
if (resolve_refish(&merge_commit, repo, opts->heads[0])) {
246246
fprintf(stderr, "failed to resolve refish %s", opts->heads[0]);
247+
return -1;
247248
}
248249

249250
/* Maybe that's a ref, so DWIM it */
@@ -293,6 +294,7 @@ static int create_merge_commit(git_repository *repo, git_index *index, merge_opt
293294
git_repository_state_cleanup(repo);
294295

295296
cleanup:
297+
free(parents);
296298
return err;
297299
}
298300

0 commit comments

Comments
 (0)