ustream-ssl: openssl: fix bio memory leak
[project/ustream-ssl.git] / openssl_bio_compat.h
index 9355c863c439acdafee82fb92943127cf3e379ea..39a0455f3d6ee6c41975e7a5299bd0ecb52b780b 100644 (file)
@@ -28,6 +28,13 @@ 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 */