diff options
| author | jsing <> | 2017-01-24 01:44:00 +0000 |
|---|---|---|
| committer | jsing <> | 2017-01-24 01:44:00 +0000 |
| commit | 4380887eb3da9276eac8a4c165732e32126b1bc8 (patch) | |
| tree | 638752c6b1feb5f40f8bff8667fcb28a69488e92 /src/lib/libssl/ssl_lib.c | |
| parent | e7f0c1112f2866fd2bd5e4a367df3ecb8b4c7566 (diff) | |
| download | openbsd-4380887eb3da9276eac8a4c165732e32126b1bc8.tar.gz openbsd-4380887eb3da9276eac8a4c165732e32126b1bc8.tar.bz2 openbsd-4380887eb3da9276eac8a4c165732e32126b1bc8.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_lib.c')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 7f49648611..01041146b7 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.141 2017/01/23 22:34:38 beck Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.142 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 | * |
| @@ -516,10 +516,8 @@ SSL_free(SSL *s) | |||
| 516 | BUF_MEM_free(s->internal->init_buf); | 516 | BUF_MEM_free(s->internal->init_buf); |
| 517 | 517 | ||
| 518 | /* add extra stuff */ | 518 | /* add extra stuff */ |
| 519 | if (s->cipher_list != NULL) | 519 | sk_SSL_CIPHER_free(s->cipher_list); |
| 520 | sk_SSL_CIPHER_free(s->cipher_list); | 520 | sk_SSL_CIPHER_free(s->internal->cipher_list_by_id); |
| 521 | if (s->internal->cipher_list_by_id != NULL) | ||
| 522 | sk_SSL_CIPHER_free(s->internal->cipher_list_by_id); | ||
| 523 | 521 | ||
| 524 | /* Make the next call work :-) */ | 522 | /* Make the next call work :-) */ |
| 525 | if (s->session != NULL) { | 523 | if (s->session != NULL) { |
| @@ -1985,10 +1983,8 @@ SSL_CTX_free(SSL_CTX *a) | |||
| 1985 | 1983 | ||
| 1986 | if (a->cert_store != NULL) | 1984 | if (a->cert_store != NULL) |
| 1987 | X509_STORE_free(a->cert_store); | 1985 | X509_STORE_free(a->cert_store); |
| 1988 | if (a->cipher_list != NULL) | 1986 | sk_SSL_CIPHER_free(a->cipher_list); |
| 1989 | sk_SSL_CIPHER_free(a->cipher_list); | 1987 | sk_SSL_CIPHER_free(a->internal->cipher_list_by_id); |
| 1990 | if (a->internal->cipher_list_by_id != NULL) | ||
| 1991 | sk_SSL_CIPHER_free(a->internal->cipher_list_by_id); | ||
| 1992 | if (a->internal->cert != NULL) | 1988 | if (a->internal->cert != NULL) |
| 1993 | ssl_cert_free(a->internal->cert); | 1989 | ssl_cert_free(a->internal->cert); |
| 1994 | if (a->internal->client_CA != NULL) | 1990 | if (a->internal->client_CA != NULL) |
