Revert "ustream-ssl: openssl: fix bio memory leak"
authorDaniel Golle <daniel@makrotopia.org>
Tue, 8 Dec 2020 22:16:55 +0000 (22:16 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 8 Dec 2020 22:18:16 +0000 (22:18 +0000)
This reverts commit 1651a795864e7a8741cb56e7ddd2208070f2cf47.
It doesn't actually compile.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
openssl_bio_compat.h
ustream-io-openssl.c

index 39a0455f3d6ee6c41975e7a5299bd0ecb52b780b..9355c863c439acdafee82fb92943127cf3e379ea 100644 (file)
@@ -28,13 +28,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
        return bm;
 }
 
-static inline void BIO_meth_free(BIO_METHOD *bm)
-{
-       if (bm != NULL) {
-               free(bm);
-       }
-}
-
 #endif /* OPENSSL_VERSION_NUMBER */
 
 #endif /* OPENSSL_BIO_COMPAT_H */
index c9d7fae1efa04d6b0c1b41b63bb58a5fc9305dd2..606ed4a36f4050cd63b98b4d56bbcaa1f68f8984 100644 (file)
@@ -42,7 +42,6 @@ s_ustream_free(BIO *b)
        BIO_set_data(b, NULL);
        BIO_set_init(b, 0);
        BIO_clear_flags(b, ~0);
-       BIO_meth_free(b->method);
        return 1;
 }