0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-19 19:42:30 +02:00
openvpn/sample
Arne Schwabe cb70cf5188 Remove NULL checks before calling free
We (and OpenSSL) already use calling free on null pointers in a number
of places and also C99 standards says free(NULL) does nothing.

The if (x) free(x) calls more often make code harder to read, instead
of easier, remove these NULL checks in favour of directly calling
free(x).

The OpenSSL *_free methods are also safe to call with NULL and
pkcs11h_certificate_freeCertificateIdList is also safe to be called with
NULL.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201023113431.26691-5-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21216.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-10-24 21:49:40 +02:00
..
sample-config-files Rename ncp-ciphers to data-ciphers 2020-07-27 10:02:54 +02:00
sample-keys Implement --genkey type keyfile syntax and migrate tls-crypt-v2 2019-07-05 12:32:49 +02:00
sample-plugins Remove NULL checks before calling free 2020-10-24 21:49:40 +02:00
sample-scripts build: standard directory layout 2012-03-22 22:07:08 +01:00
sample-windows Implement --genkey type keyfile syntax and migrate tls-crypt-v2 2019-07-05 12:32:49 +02:00
Makefile.am build: Fix make distclean/distcheck 2020-09-16 22:29:10 +02:00