From 366db56553ee02334871756ab19c72d2171ad364 Mon Sep 17 00:00:00 2001 From: grumpey Date: Sun, 11 Jul 2021 13:40:46 -0400 Subject: [PATCH] Call fclose vice free, fixes #198 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }