Skip to content

Commit f8eb0c3

Browse files
fix for coverity issue 394676 possible null dereference
1 parent d4cf93c commit f8eb0c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ssl_load.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5496,7 +5496,7 @@ long wolfSSL_set_tmp_dh(WOLFSSL *ssl, WOLFSSL_DH *dh)
54965496
ret = wolfssl_set_tmp_dh(ssl, p, pSz, g, gSz);
54975497
}
54985498

5499-
if (ret != 1) {
5499+
if (ret != 1 && ssl != NULL) {
55005500
/* Free the allocated buffers if not assigned into SSL. */
55015501
XFREE(p, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
55025502
XFREE(g, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);

0 commit comments

Comments
 (0)