diff options
author | abyss7 <abyss.7@gmail.com> | 2018-08-16 22:45:43 +0300 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-10-26 14:58:51 +0200 |
commit | a5a0347db2638939ea2f4073301ea91439814fe1 (patch) | |
tree | 03b914891cc8ac7949af54ebd7f2634e122de727 | |
parent | 0fefd8994a10163da97b2cacfe79f9d1d29f0e08 (diff) | |
download | libgit2-a5a0347db2638939ea2f4073301ea91439814fe1.tar.gz |
Fix leak in index.c
(cherry picked from commit 581d5492f6afdaf31a10e51187466a80ffc9f76f)
-rw-r--r-- | src/index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 7a8bb2c6f..2f46cb041 100644 --- a/src/index.c +++ b/src/index.c @@ -1774,7 +1774,8 @@ int git_index_conflict_add(git_index *index, if (entries[i] && !valid_filemode(entries[i]->mode)) { giterr_set(GITERR_INDEX, "invalid filemode for stage %d entry", i + 1); - return -1; + ret = -1; + goto on_error; } } |