summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bio_ssl.c
diff options
context:
space:
mode:
authorjsing <>2014-05-28 13:03:25 +0000
committerjsing <>2014-05-28 13:03:25 +0000
commit5e9669b813b32f5d5ca2ccb554e53000bd5a44d2 (patch)
tree60af46eb8cb0fcb0e51840739e416c98c124d73c /src/lib/libssl/bio_ssl.c
parent7bcea0bcb0bff06b137f084c63c8bdfc7299b84a (diff)
downloadopenbsd-5e9669b813b32f5d5ca2ccb554e53000bd5a44d2.tar.gz
openbsd-5e9669b813b32f5d5ca2ccb554e53000bd5a44d2.tar.bz2
openbsd-5e9669b813b32f5d5ca2ccb554e53000bd5a44d2.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 'src/lib/libssl/bio_ssl.c')
-rw-r--r--src/lib/libssl/bio_ssl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c
index 5b14ea3824..8ffbe0a67a 100644
--- a/src/lib/libssl/bio_ssl.c
+++ b/src/lib/libssl/bio_ssl.c
@@ -132,8 +132,7 @@ ssl_free(BIO *a)
132 a->init = 0; 132 a->init = 0;
133 a->flags = 0; 133 a->flags = 0;
134 } 134 }
135 if (a->ptr != NULL) 135 free(a->ptr);
136 free(a->ptr);
137 return (1); 136 return (1);
138} 137}
139 138