diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/config_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config_file.c b/src/config_file.c index e468a0b88..37e3f1f15 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -808,6 +808,7 @@ static int config_parse(diskfile_backend *cfg_file) case '[': /* section header, new section begins */ free(current_section); + current_section = NULL; error = parse_section_header(cfg_file, ¤t_section); break; @@ -847,8 +848,7 @@ static int config_parse(diskfile_backend *cfg_file) } } - if (current_section) - free(current_section); + free(current_section); return error == GIT_SUCCESS ? GIT_SUCCESS : git__rethrow(error, "Failed to parse config"); } |
