summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_lib.c
diff options
context:
space:
mode:
authordoug <doug@openbsd.org>2015-07-19 20:32:18 +0000
committerdoug <doug@openbsd.org>2015-07-19 20:32:18 +0000
commitdd39d9dd286e595263e46e2372bd90e9eab27ca5 (patch)
tree83767707059502d55d4e2f4e593a73051c28c503 /lib/libssl/d1_lib.c
parentTest octet counting and non transparent framing. (diff)
downloadwireguard-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/d1_lib.c')
-rw-r--r--lib/libssl/d1_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libssl/d1_lib.c b/lib/libssl/d1_lib.c
index dd789ccc702..b269efe4690 100644
--- a/lib/libssl/d1_lib.c
+++ b/lib/libssl/d1_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_lib.c,v 1.28 2015/03/19 14:00:22 tedu Exp $ */
+/* $OpenBSD: d1_lib.c,v 1.29 2015/07/19 20:32:18 doug Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -190,6 +190,9 @@ dtls1_clear_queues(SSL *s)
void
dtls1_free(SSL *s)
{
+ if (s == NULL)
+ return;
+
ssl3_free(s);
dtls1_clear_queues(s);