summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrumpey <grumpey0@gmail.com>2021-07-11 13:40:46 -0400
committerSimon Ser <contact@emersion.fr>2021-07-11 19:52:55 +0200
commit366db56553ee02334871756ab19c72d2171ad364 (patch)
tree27d81dcc9c62463db00fcb6ffff30b5b26260688
parent7ac62ebda1858875fc5f2de4ed694072aa739eb7 (diff)
Call fclose vice free, fixes #198
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index a8bd106..057eb87 100644
--- a/main.c
+++ b/main.c
@@ -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;
}