From a8106796715b31d81e2e9fee9883de54a4053ec0 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 4 Nov 2016 08:17:43 +0000 Subject: There's not much point in casting a void * to a specific type just before calling free(). ok beck@ ingo@ --- src/lib/libtls/tls_bio_cb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib') 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 @@ -/* $OpenBSD: tls_bio_cb.c,v 1.5 2016/09/14 11:30:41 bcook Exp $ */ +/* $OpenBSD: tls_bio_cb.c,v 1.6 2016/11/04 08:17:43 jsing Exp $ */ /* * Copyright (c) 2016 Tobias Pape * @@ -108,9 +108,7 @@ free_cb(BIO *bi) if (bi->shutdown) { if ((bi->init) && (bi->ptr != NULL)) { - struct bio_cb_st *b; - b = (struct bio_cb_st *)bi->ptr; - free(b); + free(bi->ptr); bi->ptr = NULL; } } -- cgit v1.2.3-55-g6feb