Skip to content

Commit c9ad250

Browse files
authored
Merge pull request libgit2#4751 from nelhage/config-double-free
Fix a double-free in config parsing
2 parents 64138b7 + b8a67ed commit c9ad250

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/config_parse.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ static int parse_variable(git_config_parser *reader, char **var_name, char **var
433433
if (multiline) {
434434
git_buf multi_value = GIT_BUF_INIT;
435435
git_buf_attach(&multi_value, value, 0);
436+
value = NULL;
436437

437438
if (parse_multiline_variable(reader, &multi_value, quote_count) < 0 ||
438439
git_buf_oom(&multi_value)) {

0 commit comments

Comments
 (0)