summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2016-11-04 08:17:43 +0000
committerjsing <>2016-11-04 08:17:43 +0000
commita8106796715b31d81e2e9fee9883de54a4053ec0 (patch)
tree280b2c4ae591a29539e237c0a5ae7f87cf363668 /src/lib
parent32f04b9a990ff63dada95a8ae666bd23e5c24a2b (diff)
downloadopenbsd-a8106796715b31d81e2e9fee9883de54a4053ec0.tar.gz
openbsd-a8106796715b31d81e2e9fee9883de54a4053ec0.tar.bz2
openbsd-a8106796715b31d81e2e9fee9883de54a4053ec0.zip
There's not much point in casting a void * to a specific type just before
calling free(). ok beck@ ingo@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libtls/tls_bio_cb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libtls/tls_bio_cb.c b/src/lib/libtls/tls_bio_cb.c
index 9a878643fa..28d93a8208 100644
--- a/src/lib/libtls/tls_bio_cb.c
+++ b/src/lib/libtls/tls_bio_cb.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_bio_cb.c,v 1.5 2016/09/14 11:30:41 bcook Exp $ */ 1/* $OpenBSD: tls_bio_cb.c,v 1.6 2016/11/04 08:17:43 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Tobias Pape <tobias@netshed.de> 3 * Copyright (c) 2016 Tobias Pape <tobias@netshed.de>
4 * 4 *
@@ -108,9 +108,7 @@ free_cb(BIO *bi)
108 108
109 if (bi->shutdown) { 109 if (bi->shutdown) {
110 if ((bi->init) && (bi->ptr != NULL)) { 110 if ((bi->init) && (bi->ptr != NULL)) {
111 struct bio_cb_st *b; 111 free(bi->ptr);
112 b = (struct bio_cb_st *)bi->ptr;
113 free(b);
114 bi->ptr = NULL; 112 bi->ptr = NULL;
115 } 113 }
116 } 114 }