diff options
author | 2015-07-19 20:32:18 +0000 | |
---|---|---|
committer | 2015-07-19 20:32:18 +0000 | |
commit | dd39d9dd286e595263e46e2372bd90e9eab27ca5 (patch) | |
tree | 83767707059502d55d4e2f4e593a73051c28c503 /lib/libssl/t1_lib.c | |
parent | Test octet counting and non transparent framing. (diff) | |
download | wireguard-openbsd-dd39d9dd286e595263e46e2372bd90e9eab27ca5.tar.xz wireguard-openbsd-dd39d9dd286e595263e46e2372bd90e9eab27ca5.zip |
Allow *_free() functions in libssl to handle NULL input.
This mimics free()'s behavior which makes error handling simpler.
ok bcook@ miod@
Diffstat (limited to 'lib/libssl/t1_lib.c')
-rw-r--r-- | lib/libssl/t1_lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c index b0f0de3bd8b..70823bf8e71 100644 --- a/lib/libssl/t1_lib.c +++ b/lib/libssl/t1_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_lib.c,v 1.79 2015/07/17 15:50:37 doug Exp $ */ +/* $OpenBSD: t1_lib.c,v 1.80 2015/07/19 20:32:18 doug Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -198,6 +198,9 @@ tls1_new(SSL *s) void tls1_free(SSL *s) { + if (s == NULL) + return; + free(s->tlsext_session_ticket); ssl3_free(s); } |