examples: fix remaining review comments
diff --git a/examples/merge.c b/examples/merge.c
index 15df7d0..206a8c4 100644
--- a/examples/merge.c
+++ b/examples/merge.c
@@ -244,6 +244,7 @@ static int create_merge_commit(git_repository *repo, git_index *index, merge_opt
check_lg2(git_repository_head(&head_ref, repo), "failed to get repo HEAD", NULL);
if (resolve_refish(&merge_commit, repo, opts->heads[0])) {
fprintf(stderr, "failed to resolve refish %s", opts->heads[0]);
+ return -1;
}
/* 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
git_repository_state_cleanup(repo);
cleanup:
+ free(parents);
return err;
}