Skip to content

Commit 9c40260

Browse files
authored
Merge pull request libgit2#5053 from tniessen/cf-check-array-alloc-result
config_file: check result of git_array_alloc
2 parents ed959ca + cc8a989 commit 9c40260

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/config_file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ static int parse_include(git_config_parser *reader,
678678
return result;
679679

680680
include = git_array_alloc(reader->file->includes);
681+
GIT_ERROR_CHECK_ALLOC(include);
681682
memset(include, 0, sizeof(*include));
682683
git_array_init(include->includes);
683684
include->path = git_buf_detach(&path);

0 commit comments

Comments
 (0)