From e1b84c43076222a250e436e71045972c584515ce Mon Sep 17 00:00:00 2001 From: doug <> Date: Sun, 19 Jul 2015 20:32:18 +0000 Subject: Allow *_free() functions in libssl to handle NULL input. This mimics free()'s behavior which makes error handling simpler. ok bcook@ miod@ --- src/lib/libssl/d1_lib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/libssl/d1_lib.c') diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index dd789ccc70..b269efe469 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/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); -- cgit v1.2.3-55-g6feb