diff --git a/tests/kat_sig_stfl.c b/tests/kat_sig_stfl.c index c81e54c00a..9c01539fb1 100644 --- a/tests/kat_sig_stfl.c +++ b/tests/kat_sig_stfl.c @@ -357,7 +357,9 @@ OQS_STATUS sig_stfl_kat(const char *method_name, const char *katfile) { OQS_MEM_insecure_free(msg); OQS_MEM_insecure_free(msg_rand); OQS_SIG_STFL_free(sig); - fclose(fp_rsp); + if (fp_rsp != NULL) { + fclose(fp_rsp); + } return ret; }