Skip to content

Commit

Permalink
src/pk.c: fix a null deref (nullPointerRedundantCheck) in wolfSSL_RSA…
Browse files Browse the repository at this point in the history
…_GenAdd() added in d350ba6.
  • Loading branch information
douzzer committed Aug 8, 2024
1 parent 24e34aa commit a75d520
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -4691,7 +4691,9 @@ int wolfSSL_RSA_GenAdd(WOLFSSL_RSA* rsa)
mp_clear(t);

#ifdef WOLFSSL_SMALL_STACK
XFREE(tmp, rsa->heap, DYNAMIC_TYPE_TMP_BUFFER);
if (rsa != NULL) {
XFREE(tmp, rsa->heap, DYNAMIC_TYPE_TMP_BUFFER);
}
#endif

return ret;
Expand Down

0 comments on commit a75d520

Please sign in to comment.