Unverified Commit b33e018c by Edward Thomson Committed by GitHub

Merge pull request #5818 from mamapanda/patch-3

merge: Check insert_head_ids error in create_virtual_base
parents 80bdeca4 dc1095a5
...@@ -2277,8 +2277,11 @@ static int create_virtual_base( ...@@ -2277,8 +2277,11 @@ static int create_virtual_base(
result->type = GIT_ANNOTATED_COMMIT_VIRTUAL; result->type = GIT_ANNOTATED_COMMIT_VIRTUAL;
result->index = index; result->index = index;
insert_head_ids(&result->parents, one); if (insert_head_ids(&result->parents, one) < 0 ||
insert_head_ids(&result->parents, two); insert_head_ids(&result->parents, two) < 0) {
git_annotated_commit_free(result);
return -1;
}
*out = result; *out = result;
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment