summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_ciph.c
diff options
context:
space:
mode:
authorjsing <>2017-01-24 01:44:00 +0000
committerjsing <>2017-01-24 01:44:00 +0000
commit3081f3692fb8e5bf49e152a7ae9b9ff9c9fc674a (patch)
tree638752c6b1feb5f40f8bff8667fcb28a69488e92 /src/lib/libssl/ssl_ciph.c
parent71e6acb0d65f7db5b5d23d22c0a5eaf2fd76d0c4 (diff)
downloadopenbsd-3081f3692fb8e5bf49e152a7ae9b9ff9c9fc674a.tar.gz
openbsd-3081f3692fb8e5bf49e152a7ae9b9ff9c9fc674a.tar.bz2
openbsd-3081f3692fb8e5bf49e152a7ae9b9ff9c9fc674a.zip
sk_SSL_CIPHER_free() checks for NULL so do not bother doing the same from
the callers.
Diffstat (limited to 'src/lib/libssl/ssl_ciph.c')
-rw-r--r--src/lib/libssl/ssl_ciph.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index af5c83fcaf..5a5bb165d8 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_ciph.c,v 1.89 2016/11/06 12:08:32 jsing Exp $ */ 1/* $OpenBSD: ssl_ciph.c,v 1.90 2017/01/24 01:44:00 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 *
@@ -1516,11 +1516,9 @@ ssl_create_cipher_list(const SSL_METHOD *ssl_method,
1516 sk_SSL_CIPHER_free(cipherstack); 1516 sk_SSL_CIPHER_free(cipherstack);
1517 return NULL; 1517 return NULL;
1518 } 1518 }
1519 if (*cipher_list != NULL) 1519 sk_SSL_CIPHER_free(*cipher_list);
1520 sk_SSL_CIPHER_free(*cipher_list);
1521 *cipher_list = cipherstack; 1520 *cipher_list = cipherstack;
1522 if (*cipher_list_by_id != NULL) 1521 sk_SSL_CIPHER_free(*cipher_list_by_id);
1523 sk_SSL_CIPHER_free(*cipher_list_by_id);
1524 *cipher_list_by_id = tmp_cipher_list; 1522 *cipher_list_by_id = tmp_cipher_list;
1525 (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, 1523 (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,
1526 ssl_cipher_ptr_id_cmp); 1524 ssl_cipher_ptr_id_cmp);