mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Handle malloc failures from read_line
This commit is contained in:
parent
9ad1e6b40f
commit
4c6c65e70c
3 changed files with 18 additions and 3 deletions
|
|
@ -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] == '#') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue