Handle malloc failures from read_line

This commit is contained in:
Drew DeVault 2016-12-15 17:08:56 -05:00
parent 9ad1e6b40f
commit 4c6c65e70c
3 changed files with 18 additions and 3 deletions

View file

@ -575,6 +575,9 @@ bool read_config(FILE *file, struct sway_config *config) {
char *line;
while (!feof(file)) {
line = read_line(file);
if (!line) {
continue;
}
line_number++;
line = strip_whitespace(line);
if (line[0] == '#') {