summaryrefslogtreecommitdiff
path: root/src/diff_patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diff_patch.c')
-rw-r--r--src/diff_patch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diff_patch.c b/src/diff_patch.c
index 4c0b9a70c..05dee5ef7 100644
--- a/src/diff_patch.c
+++ b/src/diff_patch.c
@@ -712,7 +712,7 @@ static int diff_patch_hunk_cb(
GIT_UNUSED(delta);
- git_array_alloc(patch->hunks, hunk);
+ hunk = git_array_alloc(patch->hunks);
GITERR_CHECK_ALLOC(hunk);
memcpy(&hunk->range, range, sizeof(hunk->range));
@@ -749,7 +749,7 @@ static int diff_patch_line_cb(
hunk = git_array_last(patch->hunks);
GITERR_CHECK_ALLOC(hunk);
- git_array_alloc(patch->lines, line);
+ line = git_array_alloc(patch->lines);
GITERR_CHECK_ALLOC(line);
line->ptr = content;