Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion port/posix/posix_transport_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ int posixTransportTcp_GetConnectFd(posixTransportTcpClientContext *context,
case PTT_STATE_CONNECT_WAIT:
case PTT_STATE_CONNECTED:
ret = WH_ERROR_OK;
if (*out_fd) {
if (out_fd) {
*out_fd = context->connect_fd_p1 - 1;
}
break;
Expand Down
8 changes: 7 additions & 1 deletion test/wh_test_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,7 @@ int whTestCrypto_MlDsaVerifyOnlyDma(whClientContext* ctx, int devId,
int whTest_CryptoClientConfig(whClientConfig* config)
{
int i;
int rngInited = 0;
whClientContext client[1] = {0};
int ret = 0;
/* wolfcrypt */
Expand Down Expand Up @@ -3775,6 +3776,9 @@ int whTest_CryptoClientConfig(whClientConfig* config)
if (ret != 0) {
WH_ERROR_PRINT("Failed to reinitialize RNG %d\n", ret);
}
else {
rngInited = 1;
}
}

if (ret == 0) {
Expand Down Expand Up @@ -3935,7 +3939,9 @@ int whTest_CryptoClientConfig(whClientConfig* config)
#endif /* WOLFHSM_CFG_TEST_VERBOSE */

/* Clean up used resources */
(void)wc_FreeRng(rng);
if (rngInited) {
(void)wc_FreeRng(rng);
}
(void)wh_Client_CommClose(client);
(void)wh_Client_Cleanup(client);

Expand Down