Commit 0bbaf9aaef875daf6e5db6bec143b7b84d906524

Carlos Martín Nieto 2011-03-30T16:11:55

config_parse: no need to check if current_section is non-null Signed-off-by: Carlos Martín Nieto <cmn@elego.de>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/config.c b/src/config.c
index 4c4db91..71a173f 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;