Fixes for scan-build warnings. Fix possible memory leak in wolfSSL_DH_new on failure. Add null checks in integer.c for destination to make sure “dp” grows when NULL (even though never happens in real-use). Added suppression of wc_port.c warning “Value stored to 'ret' is never read”.

This commit is contained in:
David Garske
2017-02-23 14:47:36 -08:00
parent 6425a654be
commit 9db6a27921
3 changed files with 4 additions and 2 deletions

View File

@@ -16133,6 +16133,7 @@ WOLFSSL_DH* wolfSSL_DH_new(void)
if (wc_InitDhKey(key) != 0) {
WOLFSSL_MSG("wolfSSL_DH_new InitDhKey failure");
XFREE(key, NULL, DYNAMIC_TYPE_DH);
XFREE(external, NULL, DYNAMIC_TYPE_DH);
return NULL;
}
external->internal = key;