summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_both.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/d1_both.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/d1_both.c')
-rw-r--r--src/lib/libssl/d1_both.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index 5c93af8bd9..b479c61322 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_both.c,v 1.33 2015/07/18 23:00:23 doug Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.34 2015/07/19 20:32:18 doug Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -209,6 +209,8 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
209static void 209static void
210dtls1_hm_fragment_free(hm_fragment *frag) 210dtls1_hm_fragment_free(hm_fragment *frag)
211{ 211{
212 if (frag == NULL)
213 return;
212 214
213 if (frag->msg_header.is_ccs) { 215 if (frag->msg_header.is_ccs) {
214 EVP_CIPHER_CTX_free( 216 EVP_CIPHER_CTX_free(