Commit c18c913c3d57bc0ab5dc3c0abb14de263e9a4f76

Nelson Elhage 2018-09-01T03:50:26

config: Fix a leak parsing multi-line config entries (cherry picked from commit 38b852558eb518f96c313cdcd9ce5a7af6ded194)

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/config_file.c b/src/config_file.c
index ce17437..840e9aa 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1369,6 +1369,7 @@ static int parse_multiline_variable(struct reader *reader, git_buf *value, int i
 
 		/* If it was just a comment, pretend it didn't exist */
 		if (line[0] == '\0') {
+			git__free(line);
 			in_quotes = quote_count;
 			continue;
 		}