summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2017-02-15 14:56:42 +0000
committerjsing <>2017-02-15 14:56:42 +0000
commita6dac7f3fc954bd3eac151bdc87f9f3b798a4f28 (patch)
tree2871d8d02337112448a3261e84e5bc46ece7ac1e /src
parent01e4d23bd719600c70b5ed78dacce52ca19efcaf (diff)
downloadopenbsd-a6dac7f3fc954bd3eac151bdc87f9f3b798a4f28.tar.gz
openbsd-a6dac7f3fc954bd3eac151bdc87f9f3b798a4f28.tar.bz2
openbsd-a6dac7f3fc954bd3eac151bdc87f9f3b798a4f28.zip
Avoid dereferencing a pointer when reporting an error about the same
pointer being NULL. Found by jsg@ with cppcheck; also detected by Coverity.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 7e752ae0d0..65b26209b8 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.156 2017/02/07 02:08:38 beck Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.157 2017/02/15 14:56:42 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -886,7 +886,7 @@ int
886SSL_check_private_key(const SSL *ssl) 886SSL_check_private_key(const SSL *ssl)
887{ 887{
888 if (ssl == NULL) { 888 if (ssl == NULL) {
889 SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); 889 SSLerrorx(ERR_R_PASSED_NULL_PARAMETER);
890 return (0); 890 return (0);
891 } 891 }
892 if (ssl->cert == NULL) { 892 if (ssl->cert == NULL) {