Call fclose vice free, fixes #198

This commit is contained in:
grumpey 2021-07-11 13:40:46 -04:00 committed by Simon Ser
parent 7ac62ebda1
commit 366db56553

2
main.c
View File

@ -1059,7 +1059,7 @@ static int load_config(char *path, struct swaylock_state *state,
char *flag = malloc(nread + 3);
if (flag == NULL) {
free(line);
free(config);
fclose(config);
swaylock_log(LOG_ERROR, "Failed to allocate memory");
return 0;
}