Skip to content

Commit

Permalink
Fix mem leak
Browse files Browse the repository at this point in the history
  • Loading branch information
ashman-p committed Sep 15, 2023
1 parent 86b0da5 commit f2f04d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/sig_stfl/lms/sig_stfl_lms_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ void oqs_secret_lms_key_free(OQS_SIG_STFL_SECRET_KEY *sk) {
OQS_MEM_secure_free(key_data->aux_data, key_data->len_aux_data);
}

OQS_MEM_insecure_free(key_data->context);
OQS_MEM_insecure_free(key_data);
sk->secret_key_data = NULL;
}
Expand Down
3 changes: 3 additions & 0 deletions tests/test_sig_stfl.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ static OQS_STATUS sig_stfl_test_correctness(const char *method_name, const char
OQS_SIG_STFL_free(sig);

OQS_MEM_insecure_free(read_pk_buf);
OQS_MEM_insecure_free(context);
return ret;
}

Expand Down Expand Up @@ -662,6 +663,8 @@ static OQS_STATUS sig_stfl_test_secret_key(const char *method_name) {
OQS_MEM_secure_free(to_file_sk_buf, to_file_sk_len);
OQS_MEM_secure_free(frm_file_sk_buf, frm_file_sk_len);
OQS_SIG_STFL_free(sig_obj);
OQS_MEM_insecure_free(context);
OQS_MEM_insecure_free(context_2);
return rc;
}

Expand Down

0 comments on commit f2f04d0

Please sign in to comment.