Call fclose vice free, fixes #198
This commit is contained in:
parent
7ac62ebda1
commit
366db56553
2
main.c
2
main.c
@ -1059,7 +1059,7 @@ static int load_config(char *path, struct swaylock_state *state,
|
|||||||
char *flag = malloc(nread + 3);
|
char *flag = malloc(nread + 3);
|
||||||
if (flag == NULL) {
|
if (flag == NULL) {
|
||||||
free(line);
|
free(line);
|
||||||
free(config);
|
fclose(config);
|
||||||
swaylock_log(LOG_ERROR, "Failed to allocate memory");
|
swaylock_log(LOG_ERROR, "Failed to allocate memory");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user