Skip to content

Commit

Permalink
Call fclose vice free, fixes #198
Browse files Browse the repository at this point in the history
  • Loading branch information
grumpey authored and emersion committed Jul 11, 2021
1 parent 7ac62eb commit 366db56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 366db56

Please sign in to comment.