summaryrefslogtreecommitdiff
path: root/src/lib/libssl/t1_lib.c
diff options
context:
space:
mode:
authordoug <>2015-07-19 20:32:18 +0000
committerdoug <>2015-07-19 20:32:18 +0000
commite1b84c43076222a250e436e71045972c584515ce (patch)
treecbd31a1076f71b0161d2ea3b691a126f3d856a33 /src/lib/libssl/t1_lib.c
parent243442e0f6d87748dcaccc2d2d3bf5605be3e3a9 (diff)
downloadopenbsd-e1b84c43076222a250e436e71045972c584515ce.tar.gz
openbsd-e1b84c43076222a250e436e71045972c584515ce.tar.bz2
openbsd-e1b84c43076222a250e436e71045972c584515ce.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 'src/lib/libssl/t1_lib.c')
-rw-r--r--src/lib/libssl/t1_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index b0f0de3bd8..70823bf8e7 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.79 2015/07/17 15:50:37 doug Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.80 2015/07/19 20:32:18 doug 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 *
@@ -198,6 +198,9 @@ tls1_new(SSL *s)
198void 198void
199tls1_free(SSL *s) 199tls1_free(SSL *s)
200{ 200{
201 if (s == NULL)
202 return;
203
201 free(s->tlsext_session_ticket); 204 free(s->tlsext_session_ticket);
202 ssl3_free(s); 205 ssl3_free(s);
203} 206}