wolfssl: Properly handle failure to initialize SHAKE_256

This commit is contained in:
Tobias Brunner committed 2021-05-06 11:47:38 +02:00
1 parent 2f650e085b
commit 9535c3f778
1 file changed
+1
@@ -143,6 +143,7 @@ xof_t *wolfssl_xof_create(ext_out_function_t algorithm)
if (wc_InitShake256(&this->shake, NULL, 0) != 0) if (wc_InitShake256(&this->shake, NULL, 0) != 0)
{ {
free(this); free(this);
return NULL;
} }
return &this->public; return &this->public;