From dbe397f8aeb577cd2c70e6fe2352160aa969fadc Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 27 Apr 2017 20:41:08 +0000 Subject: [PATCH] tls_free(3) and tls_config_free(3) accept NULL; patch from Matthew Martin , slightly tweaked by me --- lib/libtls/man/tls_client.3 | 9 +++++++-- lib/libtls/man/tls_init.3 | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/libtls/man/tls_client.3 b/lib/libtls/man/tls_client.3 index 47114e4ac2a..8be349c37d4 100644 --- a/lib/libtls/man/tls_client.3 +++ b/lib/libtls/man/tls_client.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tls_client.3,v 1.2 2017/01/28 00:59:36 schwarze Exp $ +.\" $OpenBSD: tls_client.3,v 1.3 2017/04/27 20:41:08 schwarze Exp $ .\" .\" Copyright (c) 2014 Ted Unangst .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 28 2017 $ +.Dd $Mdocdate: April 27 2017 $ .Dt TLS_CLIENT 3 .Os .Sh NAME @@ -70,6 +70,11 @@ After use, a TLS context should be closed with .Xr tls_close 3 , and then freed by calling .Fn tls_free . +If +.Fn tls_free +is called with an argument of +.Dv NULL , +no action occurs. .Sh RETURN VALUES .Fn tls_client and diff --git a/lib/libtls/man/tls_init.3 b/lib/libtls/man/tls_init.3 index f06a9662553..7c461cbcb7e 100644 --- a/lib/libtls/man/tls_init.3 +++ b/lib/libtls/man/tls_init.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tls_init.3,v 1.5 2017/02/20 16:01:15 jmc Exp $ +.\" $OpenBSD: tls_init.3,v 1.6 2017/04/27 20:41:08 schwarze Exp $ .\" .\" Copyright (c) 2014 Ted Unangst .\" Copyright (c) 2016 Joel Sing @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: February 20 2017 $ +.Dd $Mdocdate: April 27 2017 $ .Dt TLS_INIT 3 .Os .Sh NAME @@ -100,6 +100,11 @@ and then freed by calling When no more contexts are to be created, the configuration object should be freed by calling .Fn tls_config_free . +If +.Fa config +is +.Dv NULL , +no action occurs. .Sh RETURN VALUES .Fn tls_init returns 0 on success or -1 on error. -- 2.20.1