minor fixes for Coverity reports#8094
Conversation
a394c6e to
e83a36e
Compare
|
Retest this please Jenkins. Possible network timeout: PRB-single-flag.txt_95 |
| #ifdef WOLFSSL_SMALL_STACK | ||
| XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT); | ||
| if (dCert != NULL) { | ||
| XFREE(dCert, x->heap, DYNAMIC_TYPE_DCERT); |
There was a problem hiding this comment.
Hmm -- why are you reverting d350ba6 here? Is there something special about this use of XFREE() according to Coverity?
There was a problem hiding this comment.
thanks, I should have checked x for null here not dCert
| #ifdef WOLFSSL_SMALL_STACK | ||
| wc_AesDelete(aes, NULL); | ||
| #endif |
There was a problem hiding this comment.
This call isn't needed -- whenever wc_AesNew() sets ret to nonzero, it always returns NULL, and there is nothing to free.
There was a problem hiding this comment.
likely a false positive then, I missed that the return would always be null if ret is set to nonzero
e83a36e to
18150a1
Compare
| ret = wc_InitRng(&rng); | ||
| #endif | ||
| if (ret != 0) | ||
| ERROR_OUT(WC_TEST_RET_ENC_EC(ret), cleanup); |
There was a problem hiding this comment.
whoops, need to actually return WC_TEST_RET_ENC_EC(ret) here, since cleanup: will wc_FreeRng() unconditionally.
minor fixes for Coverity reports