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
commit851c7d6cd0625664d8c082784796f2d732118f33 (patch)
treecbd31a1076f71b0161d2ea3b691a126f3d856a33 /src/lib/libssl/d1_both.c
parenta24b14b6bf2c04501ea84182a52caa5bf2ae7635 (diff)
downloadopenbsd-851c7d6cd0625664d8c082784796f2d732118f33.tar.gz
openbsd-851c7d6cd0625664d8c082784796f2d732118f33.tar.bz2
openbsd-851c7d6cd0625664d8c082784796f2d732118f33.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(