diff options
author | 2014-05-28 13:03:24 +0000 | |
---|---|---|
committer | 2014-05-28 13:03:24 +0000 | |
commit | 9d9224c34fa672afefd4702ccd40f7a3f0d33859 (patch) | |
tree | ceb592a1008435edad633dfdf1070ac72db0a1ed /lib/libssl/bio_ssl.c | |
parent | More KNF. (diff) | |
download | wireguard-openbsd-9d9224c34fa672afefd4702ccd40f7a3f0d33859.tar.xz wireguard-openbsd-9d9224c34fa672afefd4702ccd40f7a3f0d33859.zip |
There is no point in checking if a pointer is non-NULL before calling free,
since free already does this for us. Also remove some pointless NULL
assignments, where the result from malloc(3) is immediately assigned to the
same variable.
ok miod@
Diffstat (limited to 'lib/libssl/bio_ssl.c')
-rw-r--r-- | lib/libssl/bio_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libssl/bio_ssl.c b/lib/libssl/bio_ssl.c index 5b14ea3824f..8ffbe0a67aa 100644 --- a/lib/libssl/bio_ssl.c +++ b/lib/libssl/bio_ssl.c @@ -132,8 +132,7 @@ ssl_free(BIO *a) a->init = 0; a->flags = 0; } - if (a->ptr != NULL) - free(a->ptr); + free(a->ptr); return (1); } |