Skip to content

Commit

Permalink
Addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed Aug 7, 2024
1 parent b6a9c38 commit a31d8c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -13566,7 +13566,9 @@ WOLFSSL_STACK* wolfSSL_sk_new_node(void* heap)
/* free's node but does not free internal data such as in->data.x509 */
void wolfSSL_sk_free_node(WOLFSSL_STACK* in)
{
XFREE(in, in->heap, DYNAMIC_TYPE_OPENSSL);
if (in != NULL) {
XFREE(in, in->heap, DYNAMIC_TYPE_OPENSSL);
}
}

/* pushes node "in" onto "stack" and returns pointer to the new stack on success
Expand Down
4 changes: 3 additions & 1 deletion src/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -9684,7 +9684,9 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref(
{
WOLFSSL_ENTER("wolfSSL_X509_NAME_free");
FreeX509Name(name);
XFREE(name, name->heap, DYNAMIC_TYPE_X509);
if (name != NULL) {
XFREE(name, name->heap, DYNAMIC_TYPE_X509);
}
}


Expand Down
4 changes: 3 additions & 1 deletion wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12282,7 +12282,9 @@ struct WOLFSSL_EVP_ENCODE_CTX* wolfSSL_EVP_ENCODE_CTX_new(void)
void wolfSSL_EVP_ENCODE_CTX_free(WOLFSSL_EVP_ENCODE_CTX* ctx)
{
WOLFSSL_ENTER("wolfSSL_EVP_ENCODE_CTX_free");
XFREE(ctx, ctx->heap, DYNAMIC_TYPE_OPENSSL);
if (ctx != NULL) {
XFREE(ctx, ctx->heap, DYNAMIC_TYPE_OPENSSL);
}
}
#endif /* WOLFSSL_BASE64_ENCODE || WOLFSSL_BASE64_DECODE */
#if defined(WOLFSSL_BASE64_ENCODE)
Expand Down

0 comments on commit a31d8c5

Please sign in to comment.