diff options
author | jsing <> | 2016-11-04 08:17:43 +0000 |
---|---|---|
committer | jsing <> | 2016-11-04 08:17:43 +0000 |
commit | a8106796715b31d81e2e9fee9883de54a4053ec0 (patch) | |
tree | 280b2c4ae591a29539e237c0a5ae7f87cf363668 /src/lib | |
parent | 32f04b9a990ff63dada95a8ae666bd23e5c24a2b (diff) | |
download | openbsd-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.c | 6 |
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 | } |