summaryrefslogtreecommitdiff
path: root/src/branch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/branch.c')
-rw-r--r--src/branch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/branch.c b/src/branch.c
index ef71c2cd1..3b9aa0d20 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -72,7 +72,7 @@ int git_branch_create(
goto cleanup;
error = git_reference_create(&branch, repository,
- git_buf_cstr(&canonical_branch_name), git_commit_id(commit), force);
+ git_buf_cstr(&canonical_branch_name), git_commit_id(commit), force, NULL, NULL);
if (!error)
*ref_out = branch;
@@ -181,6 +181,9 @@ void git_branch_iterator_free(git_branch_iterator *_iter)
{
branch_iter *iter = (branch_iter *) _iter;
+ if (iter == NULL)
+ return;
+
git_reference_iterator_free(iter->iter);
git__free(iter);
}