From 4070d7ffa6f7288c660a35ed1d1d1dffe4998653 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 3 May 2021 14:15:28 +0200 Subject: [PATCH] nts: close file after loading cookies Don't forget to close the file with cookies in ntsdumpdir if successfully loaded. Fixes: 2fa83b541c36 ("nts: save and load cookies on client") --- nts_ntp_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nts_ntp_client.c b/nts_ntp_client.c index 5de97ee..4b16ffd 100644 --- a/nts_ntp_client.c +++ b/nts_ntp_client.c @@ -669,6 +669,8 @@ load_cookies(NNC_Instance inst) inst->last_nke_success = context_time + SCH_GetLastEventMonoTime(); inst->context_id = context_id; + fclose(f); + DEBUG_LOG("Loaded %d cookies for %s", i, filename); return;