diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2015-07-19 20:32:19 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2015-07-19 20:32:19 +0000 |
commit | 5c570d90e439a9cb81512b7d088f4c8c5d61ab52 (patch) | |
tree | c9fb34ccd3aba9ce15f19894206336de155a2ac2 /lib/libssl/d1_both.c | |
parent | 00046c4ded0ae8d60f871fb2c05cf76208648133 (diff) |
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_both.c')
-rw-r--r-- | lib/libssl/d1_both.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c index 5c93af8bd91..b479c61322e 100644 --- a/lib/libssl/d1_both.c +++ b/lib/libssl/d1_both.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_both.c,v 1.33 2015/07/18 23:00:23 doug Exp $ */ +/* $OpenBSD: d1_both.c,v 1.34 2015/07/19 20:32:18 doug Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -209,6 +209,8 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly) static void dtls1_hm_fragment_free(hm_fragment *frag) { + if (frag == NULL) + return; if (frag->msg_header.is_ccs) { EVP_CIPHER_CTX_free( |