Skip to content

Commit 5b0258a

Browse files
authored
Merge pull request libgit2#4768 from abyss7/master
Fix leak in index.c
2 parents cada553 + 581d549 commit 5b0258a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,8 @@ int git_index_conflict_add(git_index *index,
18021802
if (entries[i] && !valid_filemode(entries[i]->mode)) {
18031803
giterr_set(GITERR_INDEX, "invalid filemode for stage %d entry",
18041804
i + 1);
1805-
return -1;
1805+
ret = -1;
1806+
goto on_error;
18061807
}
18071808
}
18081809

0 commit comments

Comments
 (0)