summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-03-30 16:11:55 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-03-31 15:05:12 +0200
commit0bbaf9aaef875daf6e5db6bec143b7b84d906524 (patch)
treea57cc760efe25f8693846f4be977a11a9d406b7f /src
parent923fe4557f441f1cb94e02acda527d2785726afa (diff)
downloadlibgit2-0bbaf9aaef875daf6e5db6bec143b7b84d906524.tar.gz
config_parse: no need to check if current_section is non-null
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Diffstat (limited to 'src')
-rw-r--r--src/config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index 4c4db91af..71a173f47 100644
--- a/src/config.c
+++ b/src/config.c
@@ -666,8 +666,7 @@ static int config_parse(git_config *cfg_file)
break;
case '[': /* section header, new section begins */
- if (current_section)
- free(current_section);
+ free(current_section);
error = parse_section_header(cfg_file, &current_section, line);
break;